|
Peano
|
Shallow matrix wrapping an existing array. More...
#include <ShallowMatrix.h>
Public Member Functions | |
| ShallowMatrix (Scalar *values) | |
| Constructs a non-initialized matrix. | |
| ShallowMatrix (const ShallowMatrix ©) | |
| Shallow copy. | |
| ShallowMatrix & | operator= (const ShallowMatrix ©) |
| Shallow copy. | |
| 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 |
| Convert the scalar type. | |
| Scalar * | data () |
| Return pointer back to original data. | |
| const Scalar * | data () const |
Private Attributes | |
| Scalar * | _values |
| Values of the matrix components. | |
Shallow matrix wrapping an existing array.
You are in charge of handling the underlying memory, i.e. the class does neither allocate anything nor destroy anything
Definition at line 29 of file ShallowMatrix.h.
| tarch::la::ShallowMatrix< Rows, Cols, Scalar >::ShallowMatrix | ( | Scalar * | values | ) |
Constructs a non-initialized matrix.
| tarch::la::ShallowMatrix< Rows, Cols, Scalar >::ShallowMatrix | ( | const ShallowMatrix< Rows, Cols, Scalar > & | copy | ) |
Shallow copy.
| int tarch::la::ShallowMatrix< Rows, Cols, Scalar >::cols | ( | ) | const |
Returns the number of columns in the matrix.
| tarch::la::Matrix< Rows, Cols, NewScalarType > tarch::la::ShallowMatrix< Rows, Cols, Scalar >::convertScalar | ( | ) | const |
Convert the scalar type.
Can also be used to convert a shallow matrix into a proper one, i.e. to deep copy.
| Scalar * tarch::la::ShallowMatrix< Rows, Cols, Scalar >::data | ( | ) |
Return pointer back to original data.
Definition at line 121 of file ShallowMatrix.h.
References tarch::la::ShallowMatrix< Rows, Cols, Scalar >::_values.
Referenced by peano4.api.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::__generate_dastgen_input_file(), peano4.api.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::__get_file_name(), peano4.api.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::__get_full_qualified_file_name(), exaparty.api.particle.Particle.Particle::__init__(), exaparty.api.particle.Particle.Particle::_add_dependency_checks(), exaparty.api.particle.Particle.Particle::_dependency_checks_modify_steps(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_boolean_array_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_boolean_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_double_array_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_double_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_enum_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_integer_array_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_integer_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_peano_double_array_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_peano_integer_array_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_string_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_user_defined_attributes(), peano4.api.datamodel.PatchToDoubleArray.PatchToDoubleArray::_get_dictionary_for_output(), peano4.api.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::construct_output(), peano4.api.datamodel.DynamicArrayOverPrimitivesToStdVector.DynamicArrayOverPrimitivesToStdVector::construct_output(), peano4.api.datamodel.PatchToDoubleArray.PatchToDoubleArray::construct_output(), peano4.api.datamodel.PatchToDoubleArrayOnHeap.PatchToDoubleArrayOnHeap::construct_output(), peano4.api.datamodel.PatchToDoubleArrayWithSmartPointer.PatchToDoubleArrayWithSmartPointer::construct_output(), peano4.api.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::get_header_file_include(), peano4.api.datamodel.DynamicArrayOverPrimitivesToStdVector.DynamicArrayOverPrimitivesToStdVector::get_header_file_include(), peano4.api.datamodel.PatchToDoubleArray.PatchToDoubleArray::get_header_file_include(), peano4.api.datamodel.PatchToDoubleArrayOnHeap.PatchToDoubleArrayOnHeap::get_header_file_include(), peano4.api.datamodel.PatchToDoubleArrayWithSmartPointer.PatchToDoubleArrayWithSmartPointer::get_header_file_include(), peano4.api.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::get_stack_container(), peano4.api.datamodel.PatchToDoubleArray.PatchToDoubleArray::get_stack_container(), peano4.api.datamodel.PatchToDoubleArrayOnHeap.PatchToDoubleArrayOnHeap::get_stack_container(), peano4.api.datamodel.PatchToDoubleArrayWithSmartPointer.PatchToDoubleArrayWithSmartPointer::get_stack_container(), peano4.api.datamodel.DaStGen2.DaStGen2::hosts_smart_pointer_attribute(), exaparty.api.particle.Particle.Particle::readme_descriptor(), exaparty.api.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius::set_parameters(), exaparty.api.particle.SPHParticle.SPHParticle::set_parameters(), and exaparty.api.particle.tests.testLeapfrogFixedTimeStepSize.testLeapfrogFixedTimeStepSize::set_parameters().

| const Scalar * tarch::la::ShallowMatrix< Rows, Cols, Scalar >::data | ( | ) | const |
Definition at line 125 of file ShallowMatrix.h.
References tarch::la::ShallowMatrix< Rows, Cols, Scalar >::_values.
Referenced by peano4.api.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::__generate_dastgen_input_file(), peano4.api.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::__get_file_name(), peano4.api.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::__get_full_qualified_file_name(), exaparty.api.particle.Particle.Particle::__init__(), exaparty.api.particle.Particle.Particle::_add_dependency_checks(), exaparty.api.particle.Particle.Particle::_dependency_checks_modify_steps(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_boolean_array_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_boolean_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_double_array_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_double_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_enum_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_integer_array_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_integer_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_peano_double_array_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_peano_integer_array_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_string_attributes(), exaparty.api.particle.tests.DastgenTestDummyParticle.DastgenTestDummyParticle::_generate_user_defined_attributes(), peano4.api.datamodel.PatchToDoubleArray.PatchToDoubleArray::_get_dictionary_for_output(), peano4.api.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::construct_output(), peano4.api.datamodel.DynamicArrayOverPrimitivesToStdVector.DynamicArrayOverPrimitivesToStdVector::construct_output(), peano4.api.datamodel.PatchToDoubleArray.PatchToDoubleArray::construct_output(), peano4.api.datamodel.PatchToDoubleArrayOnHeap.PatchToDoubleArrayOnHeap::construct_output(), peano4.api.datamodel.PatchToDoubleArrayWithSmartPointer.PatchToDoubleArrayWithSmartPointer::construct_output(), peano4.api.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::get_header_file_include(), peano4.api.datamodel.DynamicArrayOverPrimitivesToStdVector.DynamicArrayOverPrimitivesToStdVector::get_header_file_include(), peano4.api.datamodel.PatchToDoubleArray.PatchToDoubleArray::get_header_file_include(), peano4.api.datamodel.PatchToDoubleArrayOnHeap.PatchToDoubleArrayOnHeap::get_header_file_include(), peano4.api.datamodel.PatchToDoubleArrayWithSmartPointer.PatchToDoubleArrayWithSmartPointer::get_header_file_include(), peano4.api.datamodel.DaStGenToLegacyTool.DaStGenToLegacyTool::get_stack_container(), peano4.api.datamodel.PatchToDoubleArray.PatchToDoubleArray::get_stack_container(), peano4.api.datamodel.PatchToDoubleArrayOnHeap.PatchToDoubleArrayOnHeap::get_stack_container(), peano4.api.datamodel.PatchToDoubleArrayWithSmartPointer.PatchToDoubleArrayWithSmartPointer::get_stack_container(), peano4.api.datamodel.DaStGen2.DaStGen2::hosts_smart_pointer_attribute(), exaparty.api.particle.Particle.Particle::readme_descriptor(), exaparty.api.particle.SPHLeapfrogFixedSearchRadius.SPHLeapfrogFixedSearchRadius::set_parameters(), exaparty.api.particle.SPHParticle.SPHParticle::set_parameters(), and exaparty.api.particle.tests.testLeapfrogFixedTimeStepSize.testLeapfrogFixedTimeStepSize::set_parameters().

| Scalar & tarch::la::ShallowMatrix< Rows, Cols, Scalar >::operator() | ( | int | rowIndex, |
| int | colIndex | ||
| ) |
Returns element at given row and column index (from 0..size-1).
Definition at line 72 of file ShallowMatrix.h.
References tarch::la::ShallowMatrix< Rows, Cols, Scalar >::_values, assertion5, and tarch::la::ShallowMatrix< Rows, Cols, Scalar >::toString().

| const Scalar & tarch::la::ShallowMatrix< 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 90 of file ShallowMatrix.h.
References tarch::la::ShallowMatrix< Rows, Cols, Scalar >::_values, assertion5, and tarch::la::ShallowMatrix< Rows, Cols, Scalar >::toString().

| ShallowMatrix & tarch::la::ShallowMatrix< Rows, Cols, Scalar >::operator= | ( | const ShallowMatrix< Rows, Cols, Scalar > & | copy | ) |
Shallow copy.
| int tarch::la::ShallowMatrix< Rows, Cols, Scalar >::rows | ( | ) | const |
Returns the number of rows in the matrix.
| int tarch::la::ShallowMatrix< Rows, Cols, Scalar >::size | ( | ) | const |
Returns the number of total elements in the matrix.
Referenced by tarch.plotter.api.input.Patch.Patch::__repr__().

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

|
private |
Values of the matrix components.
Definition at line 34 of file ShallowMatrix.h.
Referenced by tarch::la::ShallowMatrix< Rows, Cols, Scalar >::data(), tarch::la::ShallowMatrix< Rows, Cols, Scalar >::data(), tarch::la::ShallowMatrix< Rows, Cols, Scalar >::operator()(), and tarch::la::ShallowMatrix< Rows, Cols, Scalar >::operator()().