Converts a Vector into another Vector
(setq X (new Vector: 1 3.0))
|
Returns: #(3.0)
|
(setq Y (objectToVector X)) |
Returns: #(3.0)
|
Converts a one-dimensional Matrix to a Vector
(setq X (new Matrix: 1 2 3.0 #("ABC" "DEF"))) |
Returns: #(mat| 3.0 #("ABC" "DEF"))
|
(setq Y (objectToVector X)) |
Returns: #(3.0 #("ABC" "DEF"))
|
Converts a two-dimensional Matrix to an ObjVector containing row Vectors
(setq X (new Matrix: 2 2 3 1.0 #("ABC" "DEF") 3.0 4.0 #("GHI") 6.0)) |
Returns: #(mat[2 3]| 1.0 #("ABC" "DEF" ) 3.0 4.0 #("GHI" ) 6.0 )
|
(setq Y (objectToVector X)) |
Returns: #(obj| #(1.0 #("ABC" "DEF" ) 3.0 ) #(4.0 #("GHI" ) 6.0 ) )
|
Convert three-dimensional Matrix to ObjVector containing ObjVectors
containing row Vectors
(setq X (new Matrix: 2 2 3 1.0 #("ABC" "DEF") 3.0 4.0 #("GHI") 6.0)) |
Returns: #(mat[2 3 4]| 1.0 #("ABC" "DEF" ) 3.0 4.0 #("GHI" )
6.0 7.0 "8" 9 10 11 "12" 13 14 15 "16" 17 18 19 "20" 21 22 23 24 )
|
(setq Y (objectToVector X)) |
Returns: #(obj| #(obj| #(1.0 #("ABC" "DEF" ) 3.0 4.0 )
#(#("GHI" ) 6.0 7.0 "8" ) #(9 10 11 "12" ) )
#(obj| #(13 14 15 "16" ) #(17 18 19 "20" ) #(21 22 23 24 ) ) )
|
Converts a one-dimensional NumMatrix to Vector
(setq X (new Matrix: number: 1 6 1.0 2.0 3.0 4.0 5.0 6.0)) |
Returns: #(nummat| 1.0 2.0 3.0 4.0 5.0 6.0 )
|
(setq Y (objectToVector X)) |
Returns: #(1.0 2.0 3.0 4.0 5.0 6.0 ))
|
Converts a two-dimensional NumMatrix to an ObjVector containing row Vectors
(setq X (new Matrix: number: 2 2 3 1.0 2.0 3.0 4.0 5.0 6.0)) |
Returns: #(nummat[2 3]| 1.0 2.0 3.0 4.0 5.0 6.0 )
|
(setq Y (objectToVector X)) |
Returns: #(obj| #(num| 1.0 2.0 3.0 ) #(num| 4.0 5.0 6.0 ) )
|
Converts a three-dimensional NumMatrix to ObjVector containing ObjVectors containing row Vectors
(setq X (new Matrix: number: 3 2 3 4 1.0 2.0 3.0 4.0 5.0
6.0 7.0 "8" 9 10 11 "12" 13 14 15 "16" 17 18 19 "20" 21 22 23 24)) |
Returns: #(nummat[2 3 4]| 1.0 2.0 3.0 4.0 5.0 6.0 7.0 0.0 9.0 10.0
11.0 0.0 13.0 14.0 15.0 0.0 17.0 18.0 19.0 0.0 21.0 22.0 23.0 24.0 )
|
(setq Y (objectToVector X)) |
Returns: #(obj| #(obj| #(num| 1.0 2.0 3.0 4.0 ) #(num| 5.0 6.0 7.0 0.0 )
#(num| 9.0 10.0 11.0 0.0 ) ) #(obj| #(num| 13.0 14.0 15.0 0.0 )
#(num| 17.0 18.0 19.0 0.0 ) #(num| 21.0 22.0 23.0 24.0 ) ) )
|
Converts a Bit Vector to a Vector
(setq X (new Vector: bit: 12 1 0 1 1 0 1 0 0 1 1 0 1)) |
Returns: #(bit| 1 0 1 1 0 1 0 0 1 1 0 1 )
|
(setq Y (objectToVector X)) |
Returns: #(1 0 1 1 0 1 0 0 1 1 0 1 )
|
Converts a Byte Vector to a Vector
(setq X (new Vector: byte: 5 255 32 16 8 4)) |
Returns:
|
(setq Y (objectToVector X)) |
Returns: #(255.0 32.0 16.0 8.0 4.0 )
|
Converts an Integer Vector to a Vector
(setq X (new Vector: integer: 5 255 32 16 8 4)) |
Returns: #(int| 255 32 16 8 4)
|
(setq Y (objectToVector X)) |
Returns: #(255 32 16 8 4)
|
Converts a Float Vector to a Vector
(setq X (new Vector: float: 5 -255.0 32.5 16.0 8.0 4.0)) |
Returns: #(float| -255.0 32.5 16.0 8.0 4.0 )
|
(setq Y (objectToNumVector X)) |
Returns: #(-255.0 32.5 16.0 8.0 4.0 )
|
Converts an Object Vector to a Vector
(setq X (new Vector: object: 3 4.0 #{A: 1 B: 2} #(1 2))) |
Returns: #(obj| #void #{A: 1 B: 2} #(1 2 ) )
|
Elements must be an object, not an immediate type.
(setq Y (objectToVector X)) |
Returns: #(#void #{A: 1 B: 2} #(1 2 ) )
|
Converts a Pair to a Vector
(setq X '(#(1 2 3) #(4 5) #(6 7 8))) |
Returns: (#(1 2 3 ) #(4 5 ) #(6 7 8 ))
|
(setq Y (objectToVector X)) |
Returns: #(#(1 2 3 ) #(4 5 ) #(6 7 8 ) )
|
Converts a Structure to a Vector
(setq X (new Structure: A: 22 B: 34 . 3)) |
Returns: #{A: 22 B: 34 . 3}
|
(setq Y (objectToVector X)) |
Returns: #(22.0 34.0 )
|
Converts a Dictionary to a Vector
(setq X (new Dictionary: A: 22 B: 34)) |
Returns: #{dic|| A 22 B 34}
|
(setq Y (objectToVector X)) |
Returns: #(22.0 34.0 )
|
Converts a Directory to a Vector
(setq X (new Directory: #Jan,1,1996 "New Year's Day"
#Feb,14,1996 "Valentine's Day")) |
Returns: #{dir|| #Jan,1,1996 "New Year's Day" #Feb,14,1996 "Valentine's Day"}
|
(setq Y (objectToVector X)) |
Returns: #(#Jan,1,1996 "New Year's Day" #Feb,14,1996 "Valentine's Day" )
|