translate split form to native Maple form
FromSplitForm(Ai, B, opts)
list of integer index Vectors
optional equations controlling the details of the computation
dimensions = [d1, ..., dn]
This option controls the dimensions of X. Its value needs to be a list of n positive integers, giving the dimensions of X. For example, when constructing a sparse Vector, the value should be a list containing a single positive integer, and for a Matrix it should be a list of two positive integers. If the option is not specified, Maple uses the maximal value in the ith index vector Ai as the ith dimension.
scan = true or scan = false
This option determines whether or not B is scanned for zeroes. If scan = true, the default, then B is scanned to test if it contains any entries that are equal to 0. If this is the case, the operation is aborted with an error message: such entries are not allowed. If you are certain that there are no entries equal to 0, you can save a little bit of processing time by disabling this scan by passing scan = false to the procedure. Use this option with extreme caution.
The FromSplitForm function constructs a sparse rtable X from its split form, performing the opposite function to SplitForm.
The split form of an n-dimensional rtable X with k nonzero entries consists of n+1 Vectors, A1, A2, ..., An, and B, each with k entries: for every nonzero entry Xa1,a2,...,an=b, there is an index i such that A1i=a1, A2i=a2, ..., Ani=an, and Bi=b. (If X is a Vector, then n=1; if X is a Matrix, then n=2.)
The Vectors Aj need to be of word-size integer data type; that is, on 32-bit platforms they will have data type integer4 and on 64-bit platforms data type integer8. The Vector B needs to have a data type compatible with NAG-sparse rtables; that is, the datatype of B as returned by rtable_options needs to be one of these values:
Let us examine the split form of an arbitrary matrix.
m ≔ Matrix⁡5,6,1,2=−81,2,3=−55,2,4=−15,3,1=−46,3,3=−17,3,4=99,3,5=−61,4,2=18,4,5=−78,5,6=22,datatype=integer4
ai,b ≔ SplitForm⁡m
If X has a dimension d such that all entries where index d is at its maximal value, are zero, then these are not reflected in the split form. For example, if the last entry in a sparse Vector is zero, or the last row or column of a Matrix.
m1 ≔ Matrix⁡0,1,0,2,0,0,3,0,4,'datatype=float'
m2 ≔ Matrix⁡0,1,0,2,0,0,3,0,4,0,0,0,'datatype=float'
ai1,b1 ≔ SplitForm⁡m1
ai2,b2 ≔ SplitForm⁡m2
Therefore, to recover the original rtable, you may need to use the dimensions option.
To construct the Vectors Ai from scratch in a cross-platform way, one can use kernelopts to find the right integer data type.
dt ≔ 'integer'kernelopts⁡'wordsize'8
A1 ≔ Vector⁡5,4,3,2,1,'datatype'=dt
A2 ≔ Vector⁡3,2,1,2,3,'datatype'=dt
A3 ≔ Vector⁡2,1,5,4,3,'datatype'=dt
B ≔ Vector⁡I,2+I,I−3,−2−I,−I,'datatype'='complex8'
The LinearAlgebra[FromSplitForm] command was introduced in Maple 17.
For more information on Maple 17 changes, see Updates in Maple 17.
Download Help Document