![]() |
Peano
|
Static (i.e. More...
#include <Matrix.h>
Public Member Functions | |
Matrix () | |
Constructs a non-initialized matrix. | |
Matrix (const Scalar &value) | |
Constructs an initialized matrix. | |
Matrix (std::initializer_list< Scalar > values) | |
int | rows () const |
Returns the number of rows in the matrix. | |
int | cols () const |
Returns the number of columns in the matrix. | |
int | size () const |
Returns the number of total elements in the matrix. | |
Scalar & | operator() (int rowIndex, int colIndex) |
Returns element at given row and column index (from 0..size-1). | |
const Scalar & | operator() (int rowIndex, int colIndex) const |
Returns const element at given row and column index (from 0..size-1). | |
std::string | toString () const |
std::string | toPrettyString (int numberOfDigits=4) const |
template<typename NewScalarType > | |
tarch::la::Matrix< Rows, Cols, NewScalarType > | convertScalar () const |
Scalar * | data () |
This routine returns a pointer to the first data element. | |
const Scalar * | data () const |
Private Attributes | |
Scalar | _values [Rows *Cols] |
Values of the matrix components. | |
Static (i.e.
compiletime) sized matrix type.
tarch::la::Matrix< Rows, Cols, Scalar >::Matrix | ( | ) |
Constructs a non-initialized matrix.
Definition at line 8 of file Matrix.cpph.
tarch::la::Matrix< Rows, Cols, Scalar >::Matrix | ( | const Scalar & | value | ) |
Constructs an initialized matrix.
Definition at line 14 of file Matrix.cpph.
tarch::la::Matrix< Rows, Cols, Scalar >::Matrix | ( | std::initializer_list< Scalar > | values | ) |
Definition at line 23 of file Matrix.cpph.
int tarch::la::Matrix< Rows, Cols, Scalar >::cols | ( | ) | const |
Returns the number of columns in the matrix.
Definition at line 39 of file Matrix.cpph.
Referenced by tarch::la::tests::MatrixTest::testConstruction().
tarch::la::Matrix< Rows, Cols, NewScalarType > tarch::la::Matrix< Rows, Cols, Scalar >::convertScalar | ( | ) | const |
Definition at line 100 of file Matrix.cpph.
Scalar * tarch::la::Matrix< Rows, Cols, Scalar >::data | ( | ) |
This routine returns a pointer to the first data element.
Not a beautiful one as it harms the OO idea, but in many cases it is convenient to have this operation.
Definition at line 115 of file Matrix.h.
References tarch::la::Matrix< Rows, Cols, Scalar >::_values.
Referenced by peano4.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::__generate_dastgen_input_file(), peano4.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::__get_file_name(), peano4.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::__get_full_qualified_file_name(), swift2.particle.Particle.Particle::__init__(), swift2.particle.Particle.Particle::_add_dependency_checks(), swift2.particle.Particle.Particle::_dependency_checks_modify_steps(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_boolean_array_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_boolean_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_double_array_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_double_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_enum_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_integer_array_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_integer_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_peano_double_array_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_peano_integer_array_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_string_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_user_defined_attributes(), peano4.datamodel.PatchToDoubleArray.PatchToDoubleArray::_get_dictionary_for_output(), toolbox::multiprecision::compress(), peano4.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::construct_output(), peano4.datamodel.DynamicArrayOverPrimitivesToStdVector.DynamicArrayOverPrimitivesToStdVector::construct_output(), peano4.datamodel.PatchToDoubleArray.PatchToDoubleArray::construct_output(), peano4.datamodel.PatchToDoubleArrayOnHeap.PatchToDoubleArrayOnHeap::construct_output(), peano4.datamodel.PatchToDoubleArrayWithSmartPointer.PatchToDoubleArrayWithSmartPointer::construct_output(), peano4.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::get_header_file_include(), peano4.datamodel.DynamicArrayOverPrimitivesToStdVector.DynamicArrayOverPrimitivesToStdVector::get_header_file_include(), peano4.datamodel.PatchToDoubleArray.PatchToDoubleArray::get_header_file_include(), peano4.datamodel.PatchToDoubleArrayOnHeap.PatchToDoubleArrayOnHeap::get_header_file_include(), peano4.datamodel.PatchToDoubleArrayWithSmartPointer.PatchToDoubleArrayWithSmartPointer::get_header_file_include(), peano4.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::get_stack_container(), peano4.datamodel.PatchToDoubleArray.PatchToDoubleArray::get_stack_container(), peano4.datamodel.PatchToDoubleArrayOnHeap.PatchToDoubleArrayOnHeap::get_stack_container(), peano4.datamodel.PatchToDoubleArrayWithSmartPointer.PatchToDoubleArrayWithSmartPointer::get_stack_container(), swift2.particle.Particle.Particle::readme_descriptor(), swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius::set_parameters(), swift2.particle.SPHParticle.SPHParticle::set_parameters(), and swift2.particle.tests.testLeapfrogFixedTimeStepSize.testLeapfrogFixedTimeStepSize::set_parameters().
const Scalar * tarch::la::Matrix< Rows, Cols, Scalar >::data | ( | ) | const |
Definition at line 119 of file Matrix.h.
References tarch::la::Matrix< Rows, Cols, Scalar >::_values.
Referenced by peano4.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::__generate_dastgen_input_file(), peano4.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::__get_file_name(), peano4.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::__get_full_qualified_file_name(), swift2.particle.Particle.Particle::__init__(), swift2.particle.Particle.Particle::_add_dependency_checks(), swift2.particle.Particle.Particle::_dependency_checks_modify_steps(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_boolean_array_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_boolean_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_double_array_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_double_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_enum_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_integer_array_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_integer_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_peano_double_array_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_peano_integer_array_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_string_attributes(), swift2.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_user_defined_attributes(), peano4.datamodel.PatchToDoubleArray.PatchToDoubleArray::_get_dictionary_for_output(), peano4.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::construct_output(), peano4.datamodel.DynamicArrayOverPrimitivesToStdVector.DynamicArrayOverPrimitivesToStdVector::construct_output(), peano4.datamodel.PatchToDoubleArray.PatchToDoubleArray::construct_output(), peano4.datamodel.PatchToDoubleArrayOnHeap.PatchToDoubleArrayOnHeap::construct_output(), peano4.datamodel.PatchToDoubleArrayWithSmartPointer.PatchToDoubleArrayWithSmartPointer::construct_output(), peano4.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::get_header_file_include(), peano4.datamodel.DynamicArrayOverPrimitivesToStdVector.DynamicArrayOverPrimitivesToStdVector::get_header_file_include(), peano4.datamodel.PatchToDoubleArray.PatchToDoubleArray::get_header_file_include(), peano4.datamodel.PatchToDoubleArrayOnHeap.PatchToDoubleArrayOnHeap::get_header_file_include(), peano4.datamodel.PatchToDoubleArrayWithSmartPointer.PatchToDoubleArrayWithSmartPointer::get_header_file_include(), peano4.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::get_stack_container(), peano4.datamodel.PatchToDoubleArray.PatchToDoubleArray::get_stack_container(), peano4.datamodel.PatchToDoubleArrayOnHeap.PatchToDoubleArrayOnHeap::get_stack_container(), peano4.datamodel.PatchToDoubleArrayWithSmartPointer.PatchToDoubleArrayWithSmartPointer::get_stack_container(), swift2.particle.Particle.Particle::readme_descriptor(), swift2.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius::set_parameters(), swift2.particle.SPHParticle.SPHParticle::set_parameters(), and swift2.particle.tests.testLeapfrogFixedTimeStepSize.testLeapfrogFixedTimeStepSize::set_parameters().
Scalar & tarch::la::Matrix< Rows, Cols, Scalar >::operator() | ( | int | rowIndex, |
int | colIndex ) |
Returns element at given row and column index (from 0..size-1).
Definition at line 70 of file Matrix.h.
References tarch::la::Matrix< Rows, Cols, Scalar >::_values, assertion5, and tarch::la::Matrix< Rows, Cols, Scalar >::toString().
const Scalar & tarch::la::Matrix< Rows, Cols, Scalar >::operator() | ( | int | rowIndex, |
int | colIndex ) const |
Returns const element at given row and column index (from 0..size-1).
Definition at line 88 of file Matrix.h.
References tarch::la::Matrix< Rows, Cols, Scalar >::_values, assertion5, and tarch::la::Matrix< Rows, Cols, Scalar >::toString().
int tarch::la::Matrix< Rows, Cols, Scalar >::rows | ( | ) | const |
Returns the number of rows in the matrix.
Definition at line 33 of file Matrix.cpph.
Referenced by tarch::la::tests::MatrixTest::testConstruction().
int tarch::la::Matrix< Rows, Cols, Scalar >::size | ( | ) | const |
Returns the number of total elements in the matrix.
Definition at line 45 of file Matrix.cpph.
Referenced by peano4.visualisation.input.Patch.Patch::__repr__(), kernel_impl.Enumerator::fetch(), kernel_impl.Enumerator::lower(), tarch::la::tests::MatrixTest::testConstruction(), and kernel_impl.Enumerator::upper().
std::string tarch::la::Matrix< Rows, Cols, Scalar >::toPrettyString | ( | int | numberOfDigits = 4 | ) | const |
Definition at line 73 of file Matrix.cpph.
References tarch::la::abs().
std::string tarch::la::Matrix< Rows, Cols, Scalar >::toString | ( | ) | const |
Definition at line 51 of file Matrix.cpph.
Referenced by mghype::matrixfree::solvers::dgcgcoupling::injectSolution(), tarch::la::Matrix< Rows, Cols, Scalar >::operator()(), tarch::la::Matrix< Rows, Cols, Scalar >::operator()(), and operator<<().
|
private |
Values of the matrix components.
Definition at line 36 of file Matrix.h.
Referenced by tarch::la::Matrix< Rows, Cols, Scalar >::data(), tarch::la::Matrix< Rows, Cols, Scalar >::data(), tarch::la::Matrix< Rows, Cols, Scalar >::operator()(), and tarch::la::Matrix< Rows, Cols, Scalar >::operator()().