Ginkgo
Generated from pipelines/1330831941 branch based on master. Ginkgo version 1.8.0
A numerical linear algebra library targeting many-core architectures
|
Linear operators which support permutation should implement the Permutable interface. More...
#include <ginkgo/core/base/lin_op.hpp>
Public Member Functions | |
virtual std::unique_ptr< LinOp > | permute (const array< IndexType > *permutation_indices) const |
Returns a LinOp representing the symmetric row and column permutation of the Permutable object. More... | |
virtual std::unique_ptr< LinOp > | inverse_permute (const array< IndexType > *permutation_indices) const |
Returns a LinOp representing the symmetric inverse row and column permutation of the Permutable object. More... | |
virtual std::unique_ptr< LinOp > | row_permute (const array< IndexType > *permutation_indices) const =0 |
Returns a LinOp representing the row permutation of the Permutable object. More... | |
virtual std::unique_ptr< LinOp > | column_permute (const array< IndexType > *permutation_indices) const =0 |
Returns a LinOp representing the column permutation of the Permutable object. More... | |
virtual std::unique_ptr< LinOp > | inverse_row_permute (const array< IndexType > *permutation_indices) const =0 |
Returns a LinOp representing the row permutation of the inverse permuted object. More... | |
virtual std::unique_ptr< LinOp > | inverse_column_permute (const array< IndexType > *permutation_indices) const =0 |
Returns a LinOp representing the row permutation of the inverse permuted object. More... | |
Linear operators which support permutation should implement the Permutable interface.
It provides functions to permute the rows and columns of a LinOp, independently or symmetrically, and with a regular or inverted permutation.
After a regular row permutation with permutation array perm
the row i
in the output LinOp contains the row perm[i]
from the input LinOp. After an inverse row permutation, the row perm[i]
in the output LinOp contains the row i
from the input LinOp. Equivalently, after a column permutation, the output stores in column i
the column perm[i]
from the input, and an inverse column permutation stores in column perm[i]
the column i
from the input. A symmetric permutation is functionally equivalent to calling as<Permutable>(A->row_permute(perm))->column_permute(perm)
, but the implementation can provide better performance due to kernel fusion.
|
pure virtual |
Returns a LinOp representing the column permutation of the Permutable object.
In the resulting LinOp, the column i
contains the input column perm[i]
.
From the linear algebra perspective, with , this represents the operation .
permutation_indices | the array of indices containing the permutation order perm . |
Implemented in gko::matrix::Dense< ValueType >, gko::matrix::Dense< value_type >, gko::matrix::Dense< ValueType >, gko::matrix::Dense< value_type >, and gko::matrix::Csr< ValueType, IndexType >.
|
pure virtual |
Returns a LinOp representing the row permutation of the inverse permuted object.
In the resulting LinOp, the column perm[i]
contains the input column i
.
From the linear algebra perspective, with , this represents the operation .
permutation_indices | the array of indices containing the permutation order perm . |
Implemented in gko::matrix::Dense< ValueType >, gko::matrix::Dense< value_type >, gko::matrix::Dense< ValueType >, gko::matrix::Dense< value_type >, and gko::matrix::Csr< ValueType, IndexType >.
|
inlinevirtual |
Returns a LinOp representing the symmetric inverse row and column permutation of the Permutable object.
In the resulting LinOp, the entry at location (perm[i],perm[j])
contains the input value (i,j)
.
From the linear algebra perspective, with , this represents the operation .
permutation_indices | the array of indices containing the permutation order. |
Reimplemented in gko::matrix::Dense< ValueType >, gko::matrix::Dense< value_type >, gko::matrix::Dense< ValueType >, gko::matrix::Dense< value_type >, and gko::matrix::Csr< ValueType, IndexType >.
|
pure virtual |
Returns a LinOp representing the row permutation of the inverse permuted object.
In the resulting LinOp, the row perm[i]
contains the input row i
.
From the linear algebra perspective, with , this represents the operation .
permutation_indices | the array of indices containing the permutation order perm . |
Implemented in gko::matrix::Dense< ValueType >, gko::matrix::Dense< value_type >, gko::matrix::Dense< ValueType >, gko::matrix::Dense< value_type >, and gko::matrix::Csr< ValueType, IndexType >.
|
inlinevirtual |
Returns a LinOp representing the symmetric row and column permutation of the Permutable object.
In the resulting LinOp, the entry at location (i,j)
contains the input value (perm[i],perm[j])
.
From the linear algebra perspective, with , this represents the operation .
permutation_indices | the array of indices containing the permutation order. |
Reimplemented in gko::matrix::Dense< ValueType >, gko::matrix::Dense< value_type >, gko::matrix::Dense< ValueType >, gko::matrix::Dense< value_type >, and gko::matrix::Csr< ValueType, IndexType >.
|
pure virtual |
Returns a LinOp representing the row permutation of the Permutable object.
In the resulting LinOp, the row i
contains the input row perm[i]
.
From the linear algebra perspective, with , this represents the operation .
permutation_indices | the array of indices containing the permutation order. |
Implemented in gko::matrix::Dense< ValueType >, gko::matrix::Dense< value_type >, gko::matrix::Dense< ValueType >, gko::matrix::Dense< value_type >, and gko::matrix::Csr< ValueType, IndexType >.