123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- #ifndef NODECENTRICREPMATRIXINCLUDE
- #define NODECENTRICREPMATRIXINCLUDE
- #include <sys/types.h>
- #include <stdexcept>
- #include <iostream>
- #include <valarray>
- #include <cmath>
- #ifdef NICE_USELIB_OPENMP
- #include <omp.h>
- #endif
- namespace OBJREC
- {
- class NodeCentricRepMatrix : public std::valarray<double>
- {
- private:
-
- uint m;
-
- uint n;
-
- uint e;
-
- void checkRange ( uint m, uint n, uint e ) const;
-
-
- double atQuick ( uint m, uint n, uint e ) const;
-
- double& atQuick ( uint m, uint n, uint e );
- public:
-
-
- NodeCentricRepMatrix ( const uint m, const uint n, const uint e );
-
- NodeCentricRepMatrix ( const NodeCentricRepMatrix& matrix );
-
- ~NodeCentricRepMatrix();
-
-
- uint getM() const {
- return m;
- };
-
- uint getN() const {
- return n;
- };
-
- uint getE() const {
- return e;
- };
-
-
- double at ( uint m, uint n, uint e ) const;
-
- double& at ( uint m, uint n, uint e );
-
-
- NodeCentricRepMatrix& operator-= ( NodeCentricRepMatrix const& rhs );
-
- NodeCentricRepMatrix operator- ( NodeCentricRepMatrix const& rhs );
-
- NodeCentricRepMatrix& operator= ( NodeCentricRepMatrix const& matrix );
-
- double operator() ( const uint m, const uint n, const uint e ) const;
-
- double& operator() ( const uint m, const uint n, const uint e );
-
-
- static inline double maxValue ( const NodeCentricRepMatrix& matrix ) {
- return matrix.max();
- };
-
- bool changes ( const OBJREC::NodeCentricRepMatrix& matrix, double epsilon ) const;
- };
- }
- #endif
|