MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
submat.h File Reference
#include <myassert.h>
#include <except.h>
#include <solman.h>
#include <fullmh.h>
#include <matvec3.h>
#include <matvec3n.h>
Include dependency graph for submat.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SubMatrixHandler
 
class  SubMatrixHandler::ErrResize
 
class  FullSubMatrixHandler
 
class  SparseSubMatrixHandler
 
class  SparseSubMatrixHandler::ErrResize
 
class  VariableSubMatrixHandler
 
class  SubVectorHandler
 
class  MySubVectorHandler
 

Functions

std::ostream & operator<< (std::ostream &out, const SubVectorHandler &v)
 
std::ostream & operator<< (std::ostream &out, const FullSubMatrixHandler &m)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const SubVectorHandler v 
)

Definition at line 1781 of file submat.cc.

References ASSERT, SubVectorHandler::iGetRowIndex(), and VectorHandler::iGetSize().

1782 {
1783 #ifdef DEBUG
1784  v.IsValid();
1785 #endif /* DEBUG */
1786 
1787  integer iRow = v.iGetSize();
1788 
1789  ASSERT(iRow > 0);
1790 
1791  for (integer i = 1; i <= iRow; i++) {
1792  out << std::setw(12) << v.iGetRowIndex(i)
1793  << " " << std::setw(12) << v(i) << std::endl;
1794  }
1795 
1796  return out << std::endl;
1797 }
virtual integer iGetSize(void) const =0
virtual integer iGetRowIndex(integer iSubRow) const =0
#define ASSERT(expression)
Definition: colamd.c:977
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

std::ostream& operator<< ( std::ostream &  out,
const FullSubMatrixHandler m 
)

Definition at line 836 of file submat.cc.

References ASSERT, c, FullMatrixHandler::iNumCols, FullMatrixHandler::iNumRows, FullSubMatrixHandler::piColm1, FullSubMatrixHandler::piRowm1, and FullMatrixHandler::ppdColsm1.

837 {
838 #ifdef DEBUG
839  m.IsValid();
840 #endif /* DEBUG */
841 
842  ASSERT(m.iNumRows > 0);
843  ASSERT(m.iNumCols > 0);
844  ASSERT(m.piRowm1 != NULL);
845  ASSERT(m.piColm1 != NULL);
846  ASSERT(m.ppdColsm1 != NULL);
847 
848  out << std::setw(12) << "";
849  for (integer c = 1; c <= m.iNumCols; c++) {
850  out << std::setw(12) << m.piColm1[c];
851  }
852  out << std::endl << std::endl;
853 
854  for (integer r = 1; r <= m.iNumRows; r++) {
855  out << std::setw(12) << m.piRowm1[r];
856  for (integer c = 1; c <= m.iNumCols; c++) {
857  out << std::setw(12) << m.ppdColsm1[c][r];
858  }
859  out << std::endl;
860  }
861 
862  return out << std::endl;
863 }
integer * piRowm1
Definition: submat.h:189
integer * piColm1
Definition: submat.h:191
integer iNumRows
Definition: fullmh.h:63
integer iNumCols
Definition: fullmh.h:64
#define ASSERT(expression)
Definition: colamd.c:977
static std::stack< cleanup * > c
Definition: cleanup.cc:59
doublereal ** ppdColsm1
Definition: fullmh.h:72
long int integer
Definition: colamd.c:51