func RunFromSlices(samples []string, timeIDs []uint16, metric []float64, adjacentN, discardN int) ([]Result, error) {
	sampleMap, err := fetchSampleMapFromSlices(samples, timeIDs, metric)
	if err != nil {
		return nil, err
	}

	ringMap, err := sampleMapToRing(sampleMap)
	if err != nil {
		return nil, err
	}

	results := make([]Result, 0, len(ringMap))

	for sampleID, v := range ringMap {
		res, err := v.Extrema(adjacentN, discardN)
		if err != nil {
			return nil, err
		}
		res.Identifier = sampleID.Identifier

		results = append(results, res)
	}

	return results, nil
}
// RunFromSlices runs the cardiac cycle program using 3 slices of input: the
// sample identifiers, the timing identifiers, and a metric value (e.g., number
// of connected components, or area, etc). The length of the 3 inputs must be
// the same, because the 0th sampleID corresponds to the 0th timeID and 0th
// metric, etc. AdjacentN is the number of adjacent timepoints to look at when
// computing a smoothed average, and discardN is the number of most extreme
// values to discard when computing the smoothed average.
RunFromSlices runs the cardiac cycle program using 3 slices of input: the
sample identifiers, the timing identifiers, and a metric value . The length of the 3 inputs must be
the same, because the 0th sampleID corresponds to the 0th timeID and 0th
metric, etc. AdjacentN is the number of adjacent timepoints to look at when
computing a smoothed average, and discardN is the number of most extreme
values to discard when computing the smoothed average.
// RunFromSlices runs the cardiac cycle program using 3 slices of input : the // sample identifiers the timing identifiers and a metric value ( e . g . number // of connected components or area etc ) . The length of the 3 inputs must be // the same because the 0th sampleID corresponds to the 0th timeID and 0th // metric etc . AdjacentN is the number of adjacent timepoints to look at when // computing a smoothed average and discardN is the number of most extreme // values to discard when computing the smoothed average .
func RunFromSlices(samples []string, timeIDs []uint16, metric []float64, adjacentN, discardN int) ([]Result, error) {
	sampleMap, err := fetchSampleMapFromSlices(samples, timeIDs, metric)
	if err != nil {
		return nil, err
	}
	ringMap, err := sampleMapToRing(sampleMap)
	if err != nil {
		return nil, err
	}
	results := make([]Result, 0, len(ringMap))
	for sampleID, v := range ringMap {
		res, err := v.Extrema(adjacentN, discardN)
		if err != nil {
			return nil, err
		}
		res.Identifier = sampleID.Identifier
		results = append(results, res)
	}
	return results, nil
}
func RunFromSlices ( samples [ ] string , timeIDs [ ] uint16 , metric [ ] float64 , adjacentN , discardN int ) ( [ ] Result , error ) { sampleMap , err := fetchSampleMapFromSlices ( samples , timeIDs , metric ) if err != nil { return nil , err } ringMap , err := sampleMapToRing ( sampleMap ) if err != nil { return nil , err } results := make ( [ ] Result , 0 , len ( ringMap ) ) for sampleID , v := range ringMap { res , err := v . Extrema ( adjacentN , discardN ) if err != nil { return nil , err } res . Identifier = sampleID . Identifier results = append ( results , res ) } return results , nil }
RunFromSlices runs the cardiac cycle program using 3 slices of input: the
sample identifiers, the timing identifiers, and a metric value .
RunFromSlices runs the cardiac cycle program using 3 slices of input : the sample identifiers the timing identifiers and a metric value .