Example NumMatrix sort 020

 

 

Description

These examples show how the sort function sorts the elements of the NumMatrix in descending and ascending order.

 

Details

(setq X #(nummat| 9 "e" -4.954 9.432 3)) Returns: #<NumMatrix 123456>

Sort a NumMatrix in ascending order and returns a NumMatrix containing the sorted values.

(sort X < ) Returns: #<NumMatrix 123456>

Displays the sorted NumMatrix. The Text value is replaced with 0.0.

(display X ) Returns: #(nummat| -4.954 0.0 3.0 9.0 9.432 )
(setq X #(nummat| 9 #\A -4.954 9.432 3)) Returns: #<NumMatrix 234567>

Sort a NumMatrix in descending order and returns a NumMatrix containing the sorted values.

(sort X > ) Returns: #<NumMatrix 123456>

Displays the sorted NumMatrix. The Character is replaced with its Integer ASCII value of 65.

(display X ) Returns: #(nummat| 65.0 9.432 9.0 3.0 -4.954 )

 

Related Examples

Here are examples of the sort function at work.

BitVector sort 017 Dictionary sort 003 Dictionary sort 004 Dictionary sort 005
Directory sort 007 Directory sort 008 Directory sort 009 FltVector sort 013
IntVector sort 014 List sort 018 List sort 019 Matrix sort 012
NumMatrix sort 020 NumVector sort 015 ObjVector sort 016 ShortVector sort 015
Structure sort 001 Structure sort 002 Structure sort 003 Vector sort 010
Vector sort 011

 

Function Links

Here is the link to the current function used in this example.

sort

Here are a number of links to other related functions.

binarySearch(NumMatrix) ref(NumMatrix) setq(NumMatrix) binarySearch(NumMatrix)

 

Argument Types

Here are the links to the data types of the arguments used in this example.

NumMatrix

Here are a number of links to examples having similar argument types.

Dictionary isDictionary 001 Matrix isNumberMatrix 001 Matrix objectToMatrix 001 Matrix objectToNumMatrix 001
Matrix reverse 002 NumMatrix addMethod 027 NumMatrix append 012 NumMatrix apply 009
NumMatrix binaryInsert 007 NumMatrix binarySearch 007 NumMatrix compare 023 NumMatrix compareEQ 023
NumMatrix compareGE 023 NumMatrix compareGT 023 NumMatrix compareLE 023 NumMatrix compareLT 023
NumMatrix compareNE 023 NumMatrix comparison functions 023 NumMatrix copy 011 NumMatrix count 009
NumMatrix defmethod 024 NumMatrix delete 014 NumMatrix insert 009 NumMatrix inside 009
NumMatrix isAtom 012 NumMatrix isEqual 020 NumMatrix isIdentical 020 NumMatrix isNumberMatrix 001
NumMatrix isObject 014 NumMatrix isType 022 NumMatrix length 017 NumMatrix makeGaussianMatrix 001
NumMatrix map 010 NumMatrix mapc 009 NumMatrix member 009 NumMatrix methodsOf 024
NumMatrix new 015 NumMatrix rank 002 NumMatrix ref 035 NumMatrix remove 008
NumMatrix resize 011 NumMatrix reverse 004 NumMatrix send 027 NumMatrix setCdr 013
NumMatrix setLastCdr 012 NumMatrix sizeof 028 NumMatrix sort 020 NumMatrix type 025
NumMatrix uniqueInsert 005 NumMatrix vectorFill 008 String isChar 001 String isCharAlphabetic 001
String isCharAlphanumeric 001 String isCharLowercase 001 String isCharName 001 String isCharNumeric 001
String isCharUppercase 001 String isCharWhitespace 001 String isEqual 001 String isEqual 002
String isObject 001 String isString 001 String isText 001 String isType 001
String isType 002 String isType 003 String sizeof 001 String string 001
String string 002 String string 003 String type 001 Symbol isCharName 002
Symbol isCharNumeric 002 Symbol isObject 002 Symbol isSymbol 001 Symbol isType 004
Symbol sizeof 002 Symbol type 002

How do I contact the AIS Server team?

You can always talk with the AIS at aiserver.sourceforge.net.