![]() |
Ginkgo
Generated from pipelines/2662685947 branch based on develop. Ginkgo version 2.0.0
A numerical linear algebra library targeting many-core architectures
|
ScaledPermutation is a matrix combining a permutation with scaling factors. More...
#include <ginkgo/core/matrix/scaled_permutation.hpp>
Public Types | |
| using | value_type = ValueType |
| using | index_type = IndexType |
Public Types inherited from gko::EnableCloneable< ScaledPermutation< ValueType, IndexType > > | |
| using | result_type = ScaledPermutation< ValueType, IndexType > |
Public Types inherited from gko::ConvertibleTo< ResultType > | |
| using | result_type = ResultType |
Public Types inherited from gko::WritableToMatrixData< ValueType, IndexType > | |
| using | value_type = ValueType |
| using | index_type = IndexType |
Public Member Functions | |
| value_type * | get_scaling_factors () noexcept |
| Returns a pointer to the scaling factors. More... | |
| const value_type * | get_const_scaling_factors () const noexcept |
| Returns a pointer to the scaling factors. More... | |
| index_type * | get_permutation () noexcept |
| Returns a pointer to the permutation indices. More... | |
| const index_type * | get_const_permutation () const noexcept |
| Returns a pointer to the permutation indices. More... | |
| std::unique_ptr< ScaledPermutation > | compute_inverse () const |
| Returns the inverse of this operator as a scaled permutation. More... | |
| std::unique_ptr< ScaledPermutation > | compose (ptr_param< const ScaledPermutation > other) const |
| Composes this scaled permutation with another scaled permutation. More... | |
| void | write (gko::matrix_data< value_type, index_type > &data) const override |
| Writes a matrix to a matrix_data structure. More... | |
Public Member Functions inherited from gko::LinOp | |
| void | apply (ptr_param< const LinOp > b, ptr_param< LinOp > x) const |
| Applies a linear operator to a vector (or a sequence of vectors). More... | |
| void | apply (ptr_param< const LinOp > alpha, ptr_param< const LinOp > b, ptr_param< const LinOp > beta, ptr_param< LinOp > x) const |
| Performs the operation x = alpha * op(b) + beta * x. More... | |
| const dim< 2 > & | get_size () const noexcept |
| Returns the size of the operator. More... | |
| virtual bool | apply_uses_initial_guess () const |
| Returns true if the linear operator uses the data given in x as an initial guess. More... | |
| LinOp & | operator= (const LinOp &)=default |
| Copy-assigns a LinOp. More... | |
| LinOp & | operator= (LinOp &&other) |
| Move-assigns a LinOp. More... | |
| LinOp (const LinOp &)=default | |
| Copy-constructs a LinOp. More... | |
| LinOp (LinOp &&other) | |
| Move-constructs a LinOp. More... | |
Public Member Functions inherited from gko::PolymorphicObject | |
| PolymorphicObject & | operator= (const PolymorphicObject &) |
| std::shared_ptr< const Executor > | get_executor () const noexcept |
| Returns the Executor of the object. More... | |
Public Member Functions inherited from gko::log::EnableLogging< PolymorphicObject > | |
| void | add_logger (std::shared_ptr< const Logger > logger) override |
| void | remove_logger (const Logger *logger) override |
| void | remove_logger (ptr_param< const Logger > logger) |
| const std::vector< std::shared_ptr< const Logger > > & | get_loggers () const override |
| void | clear_loggers () override |
Public Member Functions inherited from gko::log::Loggable | |
| void | remove_logger (ptr_param< const Logger > logger) |
Public Member Functions inherited from gko::EnableCloneable< ScaledPermutation< ValueType, IndexType > > | |
| std::unique_ptr< ScaledPermutation< ValueType, IndexType > > | clone (std::shared_ptr< const Executor > exec) const |
| Creates a clone of the object. More... | |
| std::unique_ptr< ScaledPermutation< ValueType, IndexType > > | clone () const |
| Creates a clone of the object. More... | |
| void | convert_to (result_type *result) const override |
| Converts the implementer to an object of type result_type. More... | |
| void | move_to (result_type *result) override |
| Converts the implementer to an object of type result_type by moving data from this object. More... | |
| std::unique_ptr< ScaledPermutation< ValueType, IndexType > > | create_default () const |
| std::unique_ptr< ScaledPermutation< ValueType, IndexType > > | create_default (std::shared_ptr< const Executor > exec) const |
Public Member Functions inherited from gko::ConvertibleTo< ResultType > | |
| void | convert_to (ptr_param< result_type > result) const |
| void | move_to (ptr_param< result_type > result) |
Public Member Functions inherited from gko::Cloneable | |
| std::unique_ptr< Cloneable > | clone (std::shared_ptr< const Executor > exec) const |
| std::unique_ptr< Cloneable > | clone () const |
| Cloneable * | copy_from (ptr_param< const Cloneable > other) |
| Cloneable * | move_from (ptr_param< Cloneable > other) |
| std::unique_ptr< Cloneable > | create_default (std::shared_ptr< const Executor > exec) const |
| std::unique_ptr< Cloneable > | create_default () const |
Static Public Member Functions | |
| static std::unique_ptr< ScaledPermutation > | create (std::shared_ptr< const Executor > exec, size_type size=0) |
| Creates an uninitialized ScaledPermutation matrix. More... | |
| static std::unique_ptr< ScaledPermutation > | create (ptr_param< const Permutation< IndexType >> permutation) |
| Create a ScaledPermutation from a Permutation. More... | |
| static std::unique_ptr< ScaledPermutation > | create (std::shared_ptr< const Executor > exec, array< value_type > scaling_factors, array< index_type > permutation_indices) |
| Creates a ScaledPermutation matrix from already allocated arrays. More... | |
| static std::unique_ptr< const ScaledPermutation > | create_const (std::shared_ptr< const Executor > exec, gko::detail::const_array_view< value_type > &&scale, gko::detail::const_array_view< index_type > &&perm_idxs) |
| Creates a constant (immutable) ScaledPermutation matrix from constant arrays. More... | |
Friends | |
| class | EnableCloneable< ScaledPermutation > |
ScaledPermutation is a matrix combining a permutation with scaling factors.
It is a combination of Diagonal and Permutation, and can be read as
, i.e. the scaling gets applied before the permutation.
| IndexType | index type of permutation indices |
| ValueType | value type of the scaling factors |
| std::unique_ptr<ScaledPermutation> gko::matrix::ScaledPermutation< ValueType, IndexType >::compose | ( | ptr_param< const ScaledPermutation< ValueType, IndexType > > | other | ) | const |
Composes this scaled permutation with another scaled permutation.
This means result = other * this from the matrix perspective, which is equivalent to first scaling and permuting by this and then by other.
| other | the other permutation |
| std::unique_ptr<ScaledPermutation> gko::matrix::ScaledPermutation< ValueType, IndexType >::compute_inverse | ( | ) | const |
Returns the inverse of this operator as a scaled permutation.
It is computed via
.
|
static |
Create a ScaledPermutation from a Permutation.
The permutation will be copied, the scaling factors are all set to 1.0.
| permutation | the permutation |
|
static |
Creates a ScaledPermutation matrix from already allocated arrays.
| exec | Executor associated to the matrix |
| permutation_indices | array of permutation indices |
| scaling_factors | array of scaling factors |
|
static |
Creates an uninitialized ScaledPermutation matrix.
| exec | Executor associated to the matrix |
| size | dimensions of the (square) scaled permutation matrix |
|
static |
Creates a constant (immutable) ScaledPermutation matrix from constant arrays.
| exec | the executor to create the object on |
| perm_idxs | the permutation index array of the matrix |
| scale | the scaling factor array |
|
inlinenoexcept |
Returns a pointer to the permutation indices.
References gko::array< ValueType >::get_const_data().
|
inlinenoexcept |
Returns a pointer to the scaling factors.
References gko::array< ValueType >::get_const_data().
|
inlinenoexcept |
Returns a pointer to the permutation indices.
References gko::array< ValueType >::get_data().
|
inlinenoexcept |
Returns a pointer to the scaling factors.
References gko::array< ValueType >::get_data().
|
overridevirtual |
Writes a matrix to a matrix_data structure.
| data | the matrix_data structure |
Implements gko::WritableToMatrixData< ValueType, IndexType >.
1.8.16