MOAB: Mesh Oriented datABase  (version 5.3.1)
MBMesquite::NonSmoothDescent::SymmetricMatrix Class Reference

#include <NonSmoothDescent.hpp>

Public Member Functions

 SymmetricMatrix ()
 ~SymmetricMatrix ()
void resize (size_t new_size)
void fill (double value)
double & operator() (size_t r, size_t c)
double operator() (size_t r, size_t c) const
double condition3x3 () const

Private Member Functions

size_t index (size_t r, size_t c) const

Private Attributes

double * storage
size_t size

Detailed Description

Definition at line 87 of file NonSmoothDescent.hpp.


Constructor & Destructor Documentation

Definition at line 99 of file NonSmoothDescent.hpp.

References storage.

        {
            free( storage );
        }

Member Function Documentation

Definition at line 1306 of file NonSmoothDescent.cpp.

References operator()().

Referenced by MBMesquite::NonSmoothDescent::search_direction().

{
    double values[9] = { operator()( 0, 0 ), operator()( 0, 1 ), operator()( 0, 2 ),
                         operator()( 1, 0 ), operator()( 1, 1 ), operator()( 1, 2 ),
                         operator()( 2, 0 ), operator()( 2, 1 ), operator()( 2, 2 ) };
    return MBMesquite::condition3x3( values );
}
void MBMesquite::NonSmoothDescent::SymmetricMatrix::fill ( double  value) [inline]

Definition at line 110 of file NonSmoothDescent.hpp.

References size, and storage.

Referenced by MBMesquite::NonSmoothDescent::init_opt().

        {
            std::fill( storage, storage + ( size * ( size + 1 ) / 2 ), value );
        }
size_t MBMesquite::NonSmoothDescent::SymmetricMatrix::index ( size_t  r,
size_t  c 
) const [inline, private]

Definition at line 91 of file NonSmoothDescent.hpp.

References size.

Referenced by operator()().

        {
            return ( r <= c ) ? size * r - r * ( r + 1 ) / 2 + c : size * c - c * ( c + 1 ) / 2 + r;
        }
double& MBMesquite::NonSmoothDescent::SymmetricMatrix::operator() ( size_t  r,
size_t  c 
) [inline]

Definition at line 115 of file NonSmoothDescent.hpp.

References index(), and storage.

Referenced by condition3x3().

        {
            return storage[index( r, c )];
        }
double MBMesquite::NonSmoothDescent::SymmetricMatrix::operator() ( size_t  r,
size_t  c 
) const [inline]

Definition at line 120 of file NonSmoothDescent.hpp.

References index(), and storage.

        {
            return storage[index( r, c )];
        }
void MBMesquite::NonSmoothDescent::SymmetricMatrix::resize ( size_t  new_size) [inline]

Definition at line 104 of file NonSmoothDescent.hpp.

References size, and storage.

Referenced by MBMesquite::NonSmoothDescent::form_grammian(), MBMesquite::NonSmoothDescent::form_reduced_matrix(), and MBMesquite::NonSmoothDescent::init_opt().

        {
            size    = new_size;
            storage = (double*)realloc( storage, sizeof( double ) * size * ( size + 1 ) / 2 );
        }

Member Data Documentation

Definition at line 90 of file NonSmoothDescent.hpp.

Referenced by fill(), index(), and resize().

List of all members.


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