SplitForm - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


LinearAlgebra

  

SplitForm

  

compute split form of a sparse rtable

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

SplitForm(X, opts)

Parameters

X

-

sparse rtable with hardware data type

opts

-

optional equations controlling the details of the computation

Options

• 

sort = 0, 1, or 2

  

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)

(2)

(3)

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.

(6)

Error, (in LinearAlgebra:-SplitForm) cannot compute split form of an rtable with non-hardware datatype anything

To make this work, we need to recreate  with, for example, option .

(7)

(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)

(10)

(11)

Compatibility

• 

The LinearAlgebra[SplitForm] command was introduced in Maple 17.

• 

For more information on Maple 17 changes, see Updates in Maple 17.

See Also

LinearAlgebra[CompressedSparseForm]

LinearAlgebra[FromCompressedSparseForm]

LinearAlgebra[FromSplitForm]

rtable_indfns

rtable_options

 


Download Help Document