|
Mantid
|
#include <MatrixVectorPairParser.h>
Public Member Functions | |
| void | addCurrentStateToResult () |
| Adds currently stored state to the parse result. | |
| void | advanceRow () |
| Advance to the next row of the matrix/vector pair. | |
| template<typename T > | |
| MatrixVectorPair< T, V3R > | getMatrixVectorPair () const |
| Construct and return the actual matrix/vector pair, the rational matrix components are castd to T. | |
| MatrixVectorPairBuilder () | |
| void | reset () |
| Completely reset the builder, including stored preliminary results. | |
| void | resetAccumulatedResults () |
| Reset all accumulated results. | |
| void | resetState () |
| Reset the current state, i.e. the state representing the current row. | |
| void | setCurrentDirection (const std::string &vector) |
| Set the direction vector to one of the stored values that correspond to x, y or z. | |
| void | setCurrentFactor (const ParsedRationalNumber &rationalNumberComponents) |
| Set the current factor, which is a rational number. | |
| void | setCurrentSignNegative () |
| Make the current sign negative. | |
| void | setCurrentSignPositive () |
| Make the current sign positive. | |
Private Attributes | |
| V3R | m_currentDirection |
| RationalNumber | m_currentFactor |
| size_t | m_currentRow |
| int | m_currentSign |
| std::map< std::string, V3R > | m_directions |
| std::vector< V3R > | m_matrixRows |
| V3R | m_vector |
Definition at line 24 of file MatrixVectorPairParser.h.
|
inline |
Definition at line 26 of file MatrixVectorPairParser.h.
References m_directions, and reset().
|
inline |
Adds currently stored state to the parse result.
This function takes the current factor, sign and direction that were assigned using the respective functions and adds to the stored intermediate result.
If the current direction is (0,0,0) then the currently processed component is only a rational number that should go into the vector component of the row that's currently being assembled. Otherwise the direction vector should be multiplied by the rational number and added to the matrix row.
After that, the current state is reset so that the next part of the current component can be processed.
Definition at line 97 of file MatrixVectorPairParser.h.
References m_currentDirection, m_currentFactor, m_currentRow, m_currentSign, m_matrixRows, m_vector, and resetState().
Referenced by Mantid::Geometry::MatrixVectorPairParser< Iterator >::MatrixVectorPairParser().
|
inline |
Advance to the next row of the matrix/vector pair.
Definition at line 114 of file MatrixVectorPairParser.h.
References m_currentRow, and resetState().
Referenced by Mantid::Geometry::MatrixVectorPairParser< Iterator >::MatrixVectorPairParser().
|
inline |
Construct and return the actual matrix/vector pair, the rational matrix components are castd to T.
Definition at line 38 of file MatrixVectorPairParser.h.
References m_currentRow, m_matrixRows, m_vector, Mantid::Geometry::x, Mantid::Geometry::y, and Mantid::Geometry::z.
Referenced by Mantid::Geometry::parseMatrixVectorPair().
|
inline |
Completely reset the builder, including stored preliminary results.
Definition at line 120 of file MatrixVectorPairParser.h.
References resetAccumulatedResults(), and resetState().
Referenced by MatrixVectorPairBuilder().
|
inline |
Reset all accumulated results.
Definition at line 133 of file MatrixVectorPairParser.h.
References m_currentRow, m_matrixRows, and m_vector.
Referenced by reset().
|
inline |
Reset the current state, i.e. the state representing the current row.
Definition at line 126 of file MatrixVectorPairParser.h.
References m_currentDirection, m_currentFactor, and m_currentSign.
Referenced by addCurrentStateToResult(), advanceRow(), and reset().
|
inline |
Set the direction vector to one of the stored values that correspond to x, y or z.
Definition at line 73 of file MatrixVectorPairParser.h.
References m_currentDirection, and m_directions.
Referenced by Mantid::Geometry::MatrixVectorPairParser< Iterator >::MatrixVectorPairParser().
|
inline |
Set the current factor, which is a rational number.
Depending on whether a direction definition follows, it's processed differently later on.
Definition at line 56 of file MatrixVectorPairParser.h.
References m_currentFactor.
Referenced by Mantid::Geometry::MatrixVectorPairParser< Iterator >::MatrixVectorPairParser().
|
inline |
Make the current sign negative.
Definition at line 76 of file MatrixVectorPairParser.h.
References m_currentSign.
Referenced by Mantid::Geometry::MatrixVectorPairParser< Iterator >::MatrixVectorPairParser().
|
inline |
Make the current sign positive.
Definition at line 79 of file MatrixVectorPairParser.h.
References m_currentSign.
Referenced by Mantid::Geometry::MatrixVectorPairParser< Iterator >::MatrixVectorPairParser().
|
private |
Definition at line 146 of file MatrixVectorPairParser.h.
Referenced by addCurrentStateToResult(), resetState(), and setCurrentDirection().
|
private |
Definition at line 145 of file MatrixVectorPairParser.h.
Referenced by addCurrentStateToResult(), resetState(), and setCurrentFactor().
|
private |
Definition at line 149 of file MatrixVectorPairParser.h.
Referenced by addCurrentStateToResult(), advanceRow(), getMatrixVectorPair(), and resetAccumulatedResults().
|
private |
Definition at line 147 of file MatrixVectorPairParser.h.
Referenced by addCurrentStateToResult(), resetState(), setCurrentSignNegative(), and setCurrentSignPositive().
|
private |
Definition at line 140 of file MatrixVectorPairParser.h.
Referenced by MatrixVectorPairBuilder(), and setCurrentDirection().
|
private |
Definition at line 142 of file MatrixVectorPairParser.h.
Referenced by addCurrentStateToResult(), getMatrixVectorPair(), and resetAccumulatedResults().
|
private |
Definition at line 143 of file MatrixVectorPairParser.h.
Referenced by addCurrentStateToResult(), getMatrixVectorPair(), and resetAccumulatedResults().