|
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. | |
Friends | |
| Matrix< Rows, Cols, Scalar > | buildMatrix (const Scalar *values) |
| Become friend of builder mechanism. | |
Static (i.e.
compiletime) sized matrix type.
| tarch::la::Matrix< Rows, Cols, Scalar >::Matrix | ( | ) |
Constructs a non-initialized matrix.
| tarch::la::Matrix< Rows, Cols, Scalar >::Matrix | ( | const Scalar & | value | ) |
Constructs an initialized matrix.
| tarch::la::Matrix< Rows, Cols, Scalar >::Matrix | ( | std::initializer_list< Scalar > | values | ) |
| int tarch::la::Matrix< Rows, Cols, Scalar >::cols | ( | ) | const |
Returns the number of columns in the matrix.
| tarch::la::Matrix< Rows, Cols, NewScalarType > tarch::la::Matrix< Rows, Cols, Scalar >::convertScalar | ( | ) | const |
| 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 130 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(), peano4.datamodel.DaStGen2.DaStGen2::hosts_smart_pointer_attribute(), 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 134 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(), peano4.datamodel.DaStGen2.DaStGen2::hosts_smart_pointer_attribute(), 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 85 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 103 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.
| int tarch::la::Matrix< Rows, Cols, Scalar >::size | ( | ) | const |
Returns the number of total elements in the matrix.
Referenced by peano4.visualisation.input.Patch.Patch::__repr__().

| std::string tarch::la::Matrix< Rows, Cols, Scalar >::toPrettyString | ( | int | numberOfDigits = 4 | ) | const |
| std::string tarch::la::Matrix< Rows, Cols, Scalar >::toString | ( | ) | const |
Referenced by tarch::la::Matrix< Rows, Cols, Scalar >::operator()(), and tarch::la::Matrix< Rows, Cols, Scalar >::operator()().

|
friend |
Become friend of builder mechanism.
We faced issues with some compiler versions with offering a constructor that simply takes a pointer to scalars. Further to that, it is not clear if such a constructor would create a deep copy or a shallow copy. Therefore, I decided to introduce an explicit builder function.
|
private |
Values of the matrix components.
Definition at line 47 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()().