-
Notifications
You must be signed in to change notification settings - Fork 4
compute issorted
kgryte edited this page May 12, 2015
·
1 revision
Returns a boolean
indicating if an input array
is sorted.
var bool = compute.issorted( [ 2, 3, 5, 4 ] );
// returns false
By default, the method assumes ascending order. To impose an arbitrary sort order, provide a comparator
function.
function descending( a, b ) {
return b - a;
}
var bool = compute.issorted( [ 5, 4, 3, 2 ], descending );
// returns true
- Utilities
- Array Creation
- Sorting and Reshaping Arrays
- Special Functions
- Arithmetic
- Relational Operations
- Logical Operations
- Trigonometry
- Geometry
- Sets
- Discrete Mathematics
- Linear Algebra
- Statistics