|
Calling Sequence
|
|
SplitForm(X, opts)
|
|
Parameters
|
|
X
|
-
|
sparse rtable with hardware data type
|
opts
|
-
|
optional equations controlling the details of the computation
|
|
|
|
|
Options
|
|
|
With sort = 1 (the default) or sort = 2, the nonzero entries of are sorted by index before computing the split form. With sort = 1, they are sorted lexicographically by index: that is, sorted by the first index, ties (if any) being broken by the second index, further ties (if any) being broken by the third index, and so on. In other words, in the result, will be sorted, and among entries with equal values for , the corresponding entries of will be sorted.
|
|
The option sort = 2 can only be used if is two-dimensional (a Matrix or a 2-dimensional Array). It sorts the entries by the second index, breaking ties using the first index. This groups entries in the same column together.
|
|
The option sort = 0 does not sort the entries; they are returned in the order in which they are stored in memory.
|
|
|
Description
|
|
•
|
The SplitForm function computes the split form of the input rtable , which needs to have one of the hardware data types. It thus performs the opposite function to FromSplitForm.
|
•
|
The split form of an -dimensional rtable with nonzero entries consists of Vectors, , , ..., , and , each with entries: for every nonzero entry , there is an index such that , , ..., , and . (If is a Vector, then ; if is a Matrix, then .)
|
•
|
The Vectors are of word-size integer data type; that is, on 32-bit platforms they will have data type and on 64-bit platforms data type . The Vector has the same data type as .
|
•
|
SplitForm returns a sequence of two objects; the first is the list , and the second is .
|
•
|
The split form is most useful for sparse rtables. If does not have sparse storage (as determined by being either or or ), then a sparse storage copy is made before determining the split form.
|
•
|
If has any indexing functions (as determined by ), then these are bypassed when determining the split form: since SplitForm is a low-level command, Maple returns the split form of the stored entries only. For example, if a Matrix is defined with option and , then only one of each pair of off-diagonal entries will be represented in the split form. However, if has indexing functions but no sparse storage, then the copy made to give it sparse storage, as explained above, typically gets rid of the indexing function and stores all nonzero entries.
|
•
|
The code for SplitForm relies on being a NAG-sparse Matrix (potentially after copying it to give it sparse storage); that is, its datatype as returned by rtable_options needs to be one of these values:
|
|
|
|
|
Examples
|
|
>
|
|
A basic example with a sparse Vector.
>
|
|
| (1) |
Notice below that the symmetric indexing function is ignored when constructing the split form.
>
|
|
| (4) |
| (5) |
The split form cannot be computed for rtables that don't have a suitable data type.
>
|
|
To make this work, we need to recreate with, for example, option .
>
|
|
>
|
|
| (8) |
Here is an example with a 4-dimensional Array that has a nonzero entry whenever the indices form a permutation of that is not a derangement.
>
|
|
>
|
|
>
|
|
| (9) |
>
|
|
>
|
|
| (11) |
|
|
Compatibility
|
|
•
|
The LinearAlgebra[SplitForm] command was introduced in Maple 17.
|
|
|
|