MOAB: Mesh Oriented datABase  (version 5.2.1)
MBMesquite::MsqMatrix< 1, 1 > Class Template Reference

#include <MsqMatrix.hpp>

Public Types

enum  { ROWS = 1, COLS = 1 }
typedef MsqMatrix< 1, 1 > my_type

Public Member Functions

 MsqMatrix ()
 MsqMatrix (double v)
 MsqMatrix (const double *v)
 MsqMatrix (const char *s)
 MsqMatrix (const std::string &s)
 MsqMatrix (const MsqMatrix< 2, 2 > &M, unsigned r, unsigned c)
MsqMatrix< 1, 1 > & operator= (double v)
MsqMatrix< 1, 1 > & operator= (const double *v)
MsqMatrix< 1, 1 > & operator= (const char *s)
MsqMatrix< 1, 1 > & operator= (const std::string &s)
double & operator() (unsigned, unsigned)
double operator() (unsigned, unsigned) const
double * data ()
const double * data () const
void zero ()
void identity ()
void set (double v)
void set (const double *v)
void set (const char *s)
void set (const std::string &s)
void diag (double v)
void diag (const double *v)
void make_minor (const MsqMatrix< 2, 2 > &M, unsigned r, unsigned c)
MsqMatrix< 1, 1 > & assign_add_transpose (const MsqMatrix< 1, 1 > &other)
MsqMatrix< 1, 1 > & assign_product (double s, const MsqMatrix< 1, 1 > &other)
MsqMatrix< 1, 1 > & assign_add_product (double s, const MsqMatrix< 1, 1 > &other)
MsqMatrix< 1, 1 > & assign_multiply_elements (const MsqMatrix< 1, 1 > &other)
 operator double () const

Protected Attributes

double m

Detailed Description

template<>
class MBMesquite::MsqMatrix< 1, 1 >

Definition at line 220 of file MsqMatrix.hpp.


Member Typedef Documentation

typedef MsqMatrix< 1, 1 > MBMesquite::MsqMatrix< 1, 1 >::my_type

Definition at line 226 of file MsqMatrix.hpp.


Member Enumeration Documentation

anonymous enum
Enumerator:
ROWS 
COLS 

Definition at line 228 of file MsqMatrix.hpp.

    {
        ROWS = 1,
        COLS = 1
    };

Constructor & Destructor Documentation

MBMesquite::MsqMatrix< 1, 1 >::MsqMatrix ( ) [inline]

Constructor for uninitialized matrix

Definition at line 235 of file MsqMatrix.hpp.

{}
MBMesquite::MsqMatrix< 1, 1 >::MsqMatrix ( double  v) [inline]

Initialize diagonal values, zero others

Definition at line 237 of file MsqMatrix.hpp.

: m( v ) {}
MBMesquite::MsqMatrix< 1, 1 >::MsqMatrix ( const double *  v) [inline]

Initialize to an array of values

Definition at line 239 of file MsqMatrix.hpp.

: m( *v ) {}
MBMesquite::MsqMatrix< 1, 1 >::MsqMatrix ( const char *  s) [inline]

Parse initial values from string

Definition at line 241 of file MsqMatrix.hpp.

    {
        set( s );
    }
MBMesquite::MsqMatrix< 1, 1 >::MsqMatrix ( const std::string &  s) [inline]

Parse initial values from string

Definition at line 246 of file MsqMatrix.hpp.

    {
        set( s );
    }
MBMesquite::MsqMatrix< 1, 1 >::MsqMatrix ( const MsqMatrix< 2, 2 > &  M,
unsigned  r,
unsigned  c 
) [inline]

Initialize to the minor of a larger matrix This matrix is the passed matrix with the specified row and column removed.

Definition at line 254 of file MsqMatrix.hpp.

: m( M( r, c ) ) {}

Member Function Documentation

MsqMatrix< 1, 1 >& MBMesquite::MsqMatrix< 1, 1 >::assign_add_product ( double  s,
const MsqMatrix< 1, 1 > &  other 
) [inline]

*this += s*m

Definition at line 348 of file MsqMatrix.hpp.

References MBMesquite::MsqMatrix< R, C >::m, and m.

    {
        m += s * other.m;
        return *this;
    }
MsqMatrix< 1, 1 >& MBMesquite::MsqMatrix< 1, 1 >::assign_add_transpose ( const MsqMatrix< 1, 1 > &  other) [inline]

*this += transpose(other)

Definition at line 336 of file MsqMatrix.hpp.

References MBMesquite::MsqMatrix< R, C >::m, and m.

    {
        m += other.m;
        return *this;
    }
MsqMatrix< 1, 1 >& MBMesquite::MsqMatrix< 1, 1 >::assign_multiply_elements ( const MsqMatrix< 1, 1 > &  other) [inline]

multiply each element by the cooresponding element in m

Definition at line 354 of file MsqMatrix.hpp.

References MBMesquite::MsqMatrix< R, C >::m, and m.

    {
        m *= other.m;
        return *this;
    }
MsqMatrix< 1, 1 >& MBMesquite::MsqMatrix< 1, 1 >::assign_product ( double  s,
const MsqMatrix< 1, 1 > &  other 
) [inline]

*this = s*m

Definition at line 342 of file MsqMatrix.hpp.

References MBMesquite::MsqMatrix< R, C >::m, and m.

    {
        m = s * other.m;
        return *this;
    }
double* MBMesquite::MsqMatrix< 1, 1 >::data ( ) [inline]

Definition at line 285 of file MsqMatrix.hpp.

References MBMesquite::MsqMatrix< R, C >::m.

    {
        return &m;
    }
const double* MBMesquite::MsqMatrix< 1, 1 >::data ( ) const [inline]

Definition at line 289 of file MsqMatrix.hpp.

References MBMesquite::MsqMatrix< R, C >::m.

    {
        return &m;
    }
void MBMesquite::MsqMatrix< 1, 1 >::diag ( double  v) [inline]

Set diagonal value to passed values, others to zero.

Definition at line 320 of file MsqMatrix.hpp.

References MBMesquite::MsqMatrix< R, C >::m.

    {
        m = v;
    }
void MBMesquite::MsqMatrix< 1, 1 >::diag ( const double *  v) [inline]

Set diagonal values to passed values, others to zero.

Definition at line 325 of file MsqMatrix.hpp.

References MBMesquite::MsqMatrix< R, C >::m.

    {
        m = *v;
    }
void MBMesquite::MsqMatrix< 1, 1 >::identity ( ) [inline]

Definition at line 298 of file MsqMatrix.hpp.

References MBMesquite::MsqMatrix< R, C >::m.

    {
        m = 1.0;
    }
void MBMesquite::MsqMatrix< 1, 1 >::make_minor ( const MsqMatrix< 2, 2 > &  M,
unsigned  r,
unsigned  c 
) [inline]

Set this matrix to the minor of a larger matrix

Definition at line 330 of file MsqMatrix.hpp.

References MBMesquite::MsqMatrix< R, C >::m.

    {
        m = M( r, c );
    }
MBMesquite::MsqMatrix< 1, 1 >::operator double ( ) const [inline]

Definition at line 360 of file MsqMatrix.hpp.

References MBMesquite::MsqMatrix< R, C >::m.

    {
        return m;
    }
double& MBMesquite::MsqMatrix< 1, 1 >::operator() ( unsigned  ,
unsigned   
) [inline]

Definition at line 277 of file MsqMatrix.hpp.

References MBMesquite::MsqMatrix< R, C >::m.

    {
        return m;
    }
double MBMesquite::MsqMatrix< 1, 1 >::operator() ( unsigned  ,
unsigned   
) const [inline]

Definition at line 281 of file MsqMatrix.hpp.

References MBMesquite::MsqMatrix< R, C >::m.

    {
        return m;
    }
MsqMatrix< 1, 1 >& MBMesquite::MsqMatrix< 1, 1 >::operator= ( double  v) [inline]

Definition at line 256 of file MsqMatrix.hpp.

References MBMesquite::MsqMatrix< R, C >::m.

    {
        m = v;
        return *this;
    }
MsqMatrix< 1, 1 >& MBMesquite::MsqMatrix< 1, 1 >::operator= ( const double *  v) [inline]

Definition at line 261 of file MsqMatrix.hpp.

References MBMesquite::MsqMatrix< R, C >::m.

    {
        m = *v;
        return *this;
    }
MsqMatrix< 1, 1 >& MBMesquite::MsqMatrix< 1, 1 >::operator= ( const char *  s) [inline]

Definition at line 266 of file MsqMatrix.hpp.

    {
        set( s );
        return *this;
    }
MsqMatrix< 1, 1 >& MBMesquite::MsqMatrix< 1, 1 >::operator= ( const std::string &  s) [inline]

Definition at line 271 of file MsqMatrix.hpp.

    {
        set( s );
        return *this;
    }
void MBMesquite::MsqMatrix< 1, 1 >::set ( double  v) [inline]

Definition at line 302 of file MsqMatrix.hpp.

References MBMesquite::MsqMatrix< R, C >::m.

    {
        m = v;
    }
void MBMesquite::MsqMatrix< 1, 1 >::set ( const double *  v) [inline]

Definition at line 306 of file MsqMatrix.hpp.

References MBMesquite::MsqMatrix< R, C >::m.

    {
        m = *v;
    }
void MBMesquite::MsqMatrix< 1, 1 >::set ( const char *  s) [inline]

Definition at line 310 of file MsqMatrix.hpp.

References MBMesquite::MsqMatrix< R, C >::m.

    {
        std::istringstream i( s );
        i >> m;
    }
void MBMesquite::MsqMatrix< 1, 1 >::set ( const std::string &  s) [inline]

Definition at line 315 of file MsqMatrix.hpp.

    {
        set( s.c_str() );
    }
void MBMesquite::MsqMatrix< 1, 1 >::zero ( ) [inline]

Definition at line 294 of file MsqMatrix.hpp.

References MBMesquite::MsqMatrix< R, C >::m.

    {
        m = 0.0;
    }

Member Data Documentation

double MBMesquite::MsqMatrix< 1, 1 >::m [protected]

List of all members.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines