Back to FabImage Library website

You are here: Start » Function Reference » Path » Path Classification » SortPaths

SortPaths


Header: FIL.h
Namespace: fil
Module: FoundationBasic

Changes the order of paths from the input array according to an ascending/descending sequence of their computed feature values.

Syntax

C++
C#
 
void fil::SortPaths
(
	const ftl::Array<fil::Path>& inPaths,
	fil::PathFilter::Type inPathFilter,
	fil::PathFeature::Type inFeature,
	fil::SortingOrder::Type inSortingOrder,
	ftl::Array<fil::Path>& outSortedPaths,
	ftl::Optional<ftl::Array<float>&> outSortedValues = ftl::NIL
)

Parameters

Name Type Default Description
Input value inPaths const Array<Path>& Input paths
Input value inPathFilter PathFilter::Type Determines which paths will take part in computation
Input value inFeature PathFeature::Type Path feature value to be computed
Input value inSortingOrder SortingOrder::Type Sorting order
Output value outSortedPaths Array<Path>& Paths sorted according to the computed feature values
Output value outSortedValues Optional<Array<float>&> NIL Computed feature values

Optional Outputs

The computation of following outputs can be switched off by passing value ftl::NIL to these parameters: outSortedValues.

Read more about Optional Outputs.