matrixss Class Reference

Symmetric sparse matrix indices management. More...

#include <matrixss.h>

List of all members.

Public Member Functions

void noteIdx (int i, int j)
 Reserves space for the given pair of indices in the matrix.
void clearIdx ()
 Erases all the space reservations.
int getNValues () const
 Returns the number of values in the matrix.
int getI (int n) const
 Returns the first index of the specified value.
int getJ (int n) const
 Returns the second index of the specified value.
bool isSymmetric () const
 Checks if this matrix is symmetric.
void reduce ()
 Reduces the number of stored elements by using the symmetry. This must be called once, after all elements are registered. In principle, the reduction can be done during the registration (as it will be done in future). Making this a separate function allows to assert that the matrix is indeed symmetric. This is useful for internal check of the program.
double product (matrixValues cl, matrixValues cr, matrixValues vals) const
 Calculates the product of two vectors with this matrix. This evaluates L x M x R, where R is a column vector, M is the matrix (sparse, with element indices, represented by this object), L is a row vector.
int getMatIndicesStorageSize ()
 Returns the amount of RAM, occupied by this object.
 ~matrixss ()
 Frees resources, associated with this object.

Detailed Description

Symmetric sparse matrix indices management.

Author:
Konstantin L. Metlov <metlov@kinetic.ac.donetsk.ua>

Member Function Documentation

int matrixss::getI ( int  n  )  const [inline]

Returns the first index of the specified value.

Parameters:
n value number
Returns:
first index of the index pair.

Referenced by nanomagn::mesh::calculateNearIntMat(), nanomagn::group::checkGroupCoverage(), and nanomagn::mesh::printMesh().

int matrixss::getJ ( int  n  )  const [inline]

Returns the second index of the specified value.

Parameters:
n value number
Returns:
second index of the index pair.

Referenced by nanomagn::mesh::calculateNearIntMat(), nanomagn::group::checkGroupCoverage(), and nanomagn::mesh::printMesh().

int matrixss::getMatIndicesStorageSize (  ) 

Returns the amount of RAM, occupied by this object.

Returns:
The amount of RAM in bytes.

Referenced by nanomagn::mesh::getMatSSStorageSize(), nanomagn::mesh::getMatVFStorageSize(), and nanomagn::mesh::getMatVSStorageSize().

int matrixss::getNValues (  )  const [inline]

Returns the number of values in the matrix.

Returns:
number of values currently reserved by noteIdx.

Referenced by nanomagn::mesh::calculateNearIntMat(), nanomagn::group::checkGroupCoverage(), nanomagn::mesh::getMatSSStorageSize(), nanomagn::mesh::getMatVFStorageSize(), and nanomagn::mesh::getMatVSStorageSize().

bool matrixss::isSymmetric (  )  const

Checks if this matrix is symmetric.

Returns:
true if the matrix is symmetric indeed.

Referenced by nanomagn::mesh::isNearIntSymmetric().

void matrixss::noteIdx ( int  i,
int  j 
) [inline]

Reserves space for the given pair of indices in the matrix.

Parameters:
i is the first index of the pair.
j is the second index of the pair.

Referenced by nanomagn::mesh::noteNearInt().

double matrixss::product ( matrixValues  cl,
matrixValues  cr,
matrixValues  vals 
) const

Calculates the product of two vectors with this matrix. This evaluates L x M x R, where R is a column vector, M is the matrix (sparse, with element indices, represented by this object), L is a row vector.

Parameters:
cl contains the values of the left vector (L)
cr contains the values of the right vector (R)
vals contains non-zero values of the sparse matrix.
Returns:
scalar value of the producr.

Referenced by nanomagn::mesh::calcEnergyMS().


The documentation for this class was generated from the following files:
Generated on Mon Oct 8 18:26:45 2012 for nanomagnFMM by  doxygen 1.6.3