SecreC 2 language 2.9.0 (2026.10)
Language and standard library reference
Loading...
Searching...
No Matches
Functions

Functions

template<domain D :shared3p >
D bool sort (D bool arr)
 
template<domain D :shared3p , type T>
D T sort (D T vec)
 

Detailed Description

Function for sorting values in a vector.

Note
D - shared3p protection domain
Returns
returns a sorted vector from smaller to bigger values
Leakage
Shuffled reordering decisions are declassified
Leaks the number of equal elements

Function Documentation

◆ sort() [1/2]

template<domain D :shared3p >
D bool sort ( D bool  arr)
Note
Supported types - bool
boolean values are sorted after their numerical value. false first then true
Parameters
arr- a 1-dimensonal boolean vector

◆ sort() [2/2]

template<domain D :shared3p , type T>
D T sort ( D T  vec)
Note
T - any data type
Parameters
vec- a 1-dimensonal supported type vector