ml-spectra-processing
Advanced tools
Comparing version 4.11.0 to 4.12.0
# Changelog | ||
## [4.12.0](https://www.github.com/mljs/spectra-processing/compare/v4.11.0...v4.12.0) (2021-01-08) | ||
### Features | ||
* add xMaxValue ([df69c01](https://www.github.com/mljs/spectra-processing/commit/df69c01003788510ffb2bb80bf8e724000885869)) | ||
* add xMinValue ([4674548](https://www.github.com/mljs/spectra-processing/commit/467454822b888a81409cf2143623deff8909e6fc)) | ||
* add xSum ([6c3b90c](https://www.github.com/mljs/spectra-processing/commit/6c3b90ca16ce2eab5ee615b195dff323bdebcffc)) | ||
## [4.11.0](https://www.github.com/mljs/spectra-processing/compare/v4.10.0...v4.11.0) (2021-01-08) | ||
@@ -4,0 +13,0 @@ |
{ | ||
"name": "ml-spectra-processing", | ||
"version": "4.11.0", | ||
"version": "4.12.0", | ||
"description": "Various method to process spectra", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -41,2 +41,6 @@ /** | ||
export * from './x/xIsMonotone'; | ||
export * from './x/xMaxIndex'; | ||
export * from './x/xMaxValue'; | ||
export * from './x/xMinIndex'; | ||
export * from './x/xMinValue'; | ||
export * from './x/xMultiply'; | ||
@@ -52,4 +56,3 @@ export * from './x/xNoiseSanPlot'; | ||
export * from './x/xSubtract'; | ||
export * from './x/xMinIndex'; | ||
export * from './x/xMaxIndex'; | ||
export * from './x/xSum'; | ||
@@ -56,0 +59,0 @@ export * from './reim/reimAbsolute'; |
import xCheck from './xCheck'; | ||
/** | ||
* Computes the index of the maximum of the given values | ||
* @param {Array<number>} input | ||
* @param {Array<number>} array | ||
* @return {number} | ||
*/ | ||
export function xMaxIndex(input) { | ||
xCheck(input); | ||
export function xMaxIndex(array) { | ||
xCheck(array); | ||
let maxIndex = 0; | ||
for (let i = 1; i < input.length; i++) { | ||
if (input[i] > input[maxIndex]) { | ||
for (let i = 1; i < array.length; i++) { | ||
if (array[i] > array[maxIndex]) { | ||
maxIndex = i; | ||
@@ -15,0 +15,0 @@ } |
@@ -5,10 +5,10 @@ import xCheck from './xCheck'; | ||
* Computes the index of the minimum of the given values | ||
* @param {Array<number>} input | ||
* @param {Array<number>} array | ||
* @return {number} | ||
*/ | ||
export function xMinIndex(input) { | ||
xCheck(input); | ||
export function xMinIndex(array) { | ||
xCheck(array); | ||
let minIndex = 0; | ||
for (let i = 1; i < input.length; i++) { | ||
if (input[i] < input[minIndex]) { | ||
for (let i = 1; i < array.length; i++) { | ||
if (array[i] < array[minIndex]) { | ||
minIndex = i; | ||
@@ -15,0 +15,0 @@ } |
@@ -6,3 +6,3 @@ import { xGetFromToIndex } from '../x/xGetFromToIndex'; | ||
/** | ||
* In place modification of the 2 arrays to make X unique and sum the Y if X has the same value | ||
* Calculate integration | ||
* @param {DataXY} [data={}] - Object that contains property x (an ordered increasing array) and y (an array) | ||
@@ -9,0 +9,0 @@ * @param {object} [options={}] |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
192336
82
5406