MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
SparseSubMatrixHandler Class Reference

#include <submat.h>

Inheritance diagram for SparseSubMatrixHandler:
Collaboration diagram for SparseSubMatrixHandler:

Classes

class  ErrResize
 

Public Member Functions

 SparseSubMatrixHandler (integer iTmpInt, integer *piTmpIndex, integer iTmpDouble, doublereal *pdTmpMat)
 
 SparseSubMatrixHandler (integer iTmpInt)
 
virtual ~SparseSubMatrixHandler (void)
 
integer iGetNumRows (void) const
 
integer iGetNumCols (void) const
 
void Resize (integer iNewRow, integer iNewCol)
 
void ResizeReset (integer iNewRow, integer iNewCol)
 
void Reset (void)
 
void Attach (int iNumEntr, doublereal *pdTmpMat, integer *piTmpIndx)
 
void PutCoef (integer iSubIt, integer iDmy, const doublereal &dCoef)
 
void IncCoef (integer iSubIt, integer iDmy, const doublereal &dCoef)
 
void DecCoef (integer iSubIt, integer iDmy, const doublereal &dCoef)
 
const doublerealdGetCoef (integer iSubIt, integer iDmy) const
 
const doublerealoperator() (integer iSubIt, integer iDmy) const
 
doublerealoperator() (integer iSubIt, integer iDmy)
 
void PutRowIndex (integer iSubIt, integer iRow)
 
void PutColIndex (integer iSubIt, integer iCol)
 
integer iGetRowIndex (integer iSubIt) const
 
integer iGetColIndex (integer iSubIt) const
 
void PutItem (integer iSubIt, integer iRow, integer iCol, const doublereal &dCoef)
 
void PutDiag (integer iSubIt, integer iFirstRow, integer iFirstCol, const Vec3 &v)
 
void PutDiag (integer iSubIt, integer iFirstRow, integer iFirstCol, const doublereal &d)
 
void PutCross (integer iSubIt, integer iFirstRow, integer iFirstCol, const Vec3 &v)
 
void PutMat3x3 (integer iSubIt, integer iFirstRow, integer iFirstCol, const Mat3x3 &m)
 
MatrixHandlerAddTo (MatrixHandler &MH) const
 
MatrixHandlerAddToT (MatrixHandler &MH) const
 
MatrixHandlerAddTo (FullMatrixHandler &MH) const
 
MatrixHandlerAddToT (FullMatrixHandler &MH) const
 
MatrixHandlerSubFrom (MatrixHandler &MH) const
 
MatrixHandlerSubFromT (MatrixHandler &MH) const
 
MatrixHandlerSubFrom (FullMatrixHandler &MH) const
 
MatrixHandlerSubFromT (FullMatrixHandler &MH) const
 
- Public Member Functions inherited from SubMatrixHandler
virtual ~SubMatrixHandler (void)
 
- Public Member Functions inherited from MatrixHandler
virtual ~MatrixHandler (void)
 
virtual const doublerealpdGetMat (void) const
 
virtual doublerealpdGetMat (void)
 
virtual integerpiGetRows (void) const
 
virtual integerpiGetCols (void) const
 
virtual integer PacMat (void)
 
virtual MatrixHandleroperator= (const MatrixHandler &MH)
 
virtual MatrixHandleroperator+= (const SubMatrixHandler &SubMH)
 
virtual MatrixHandleroperator-= (const SubMatrixHandler &SubMH)
 
virtual MatrixHandleroperator+= (const VariableSubMatrixHandler &SubMH)
 
virtual MatrixHandleroperator-= (const VariableSubMatrixHandler &SubMH)
 
virtual MatrixHandlerScalarMul (const doublereal &d)
 
virtual MatrixHandlerMatMatMul (MatrixHandler &out, const MatrixHandler &in) const
 
virtual MatrixHandlerMatTMatMul (MatrixHandler &out, const MatrixHandler &in) const
 
virtual MatrixHandlerMatMatIncMul (MatrixHandler &out, const MatrixHandler &in) const
 
virtual MatrixHandlerMatTMatIncMul (MatrixHandler &out, const MatrixHandler &in) const
 
virtual MatrixHandlerMatMatDecMul (MatrixHandler &out, const MatrixHandler &in) const
 
virtual MatrixHandlerMatTMatDecMul (MatrixHandler &out, const MatrixHandler &in) const
 
virtual VectorHandlerMatVecMul (VectorHandler &out, const VectorHandler &in) const
 
virtual VectorHandlerMatTVecMul (VectorHandler &out, const VectorHandler &in) const
 
virtual VectorHandlerMatVecIncMul (VectorHandler &out, const VectorHandler &in) const
 
virtual VectorHandlerMatTVecIncMul (VectorHandler &out, const VectorHandler &in) const
 
virtual VectorHandlerMatVecDecMul (VectorHandler &out, const VectorHandler &in) const
 
virtual VectorHandlerMatTVecDecMul (VectorHandler &out, const VectorHandler &in) const
 
virtual doublereal ConditionNumber (enum Norm_t eNorm=NORM_1) const
 
virtual doublereal Norm (enum Norm_t eNorm=NORM_1) const
 

Private Member Functions

 SparseSubMatrixHandler (const SparseSubMatrixHandler &)
 

Private Attributes

bool bOwnsMemory
 
integer iIntSize
 
integer iDoubleSize
 
integer iNumItems
 
integerpiRowm1
 
integerpiColm1
 
doublerealpdMatm1
 

Friends

class SparseMatrixHandler
 
class FullMatrixHandler
 
class NaiveMatrixHandler
 
class NaivePermMatrixHandler
 

Additional Inherited Members

- Public Types inherited from MatrixHandler
enum  Norm_t { NORM_1, NORM_INF }
 
- Protected Member Functions inherited from MatrixHandler
virtual MatrixHandlerMatMatMul_base (void(MatrixHandler::*op)(integer iRow, integer iCol, const doublereal &dCoef), MatrixHandler &out, const MatrixHandler &in) const
 
virtual MatrixHandlerMatTMatMul_base (void(MatrixHandler::*op)(integer iRow, integer iCol, const doublereal &dCoef), MatrixHandler &out, const MatrixHandler &in) const
 
virtual VectorHandlerMatVecMul_base (void(VectorHandler::*op)(integer iRow, const doublereal &dCoef), VectorHandler &out, const VectorHandler &in) const
 
virtual VectorHandlerMatTVecMul_base (void(VectorHandler::*op)(integer iRow, const doublereal &dCoef), VectorHandler &out, const VectorHandler &in) const
 

Detailed Description

Definition at line 744 of file submat.h.

Constructor & Destructor Documentation

SparseSubMatrixHandler::SparseSubMatrixHandler ( const SparseSubMatrixHandler )
private
SparseSubMatrixHandler::SparseSubMatrixHandler ( integer  iTmpInt,
integer piTmpIndex,
integer  iTmpDouble,
doublereal pdTmpMat 
)

Definition at line 972 of file submat.cc.

References ASSERT, iNumItems, pdMatm1, piColm1, and piRowm1.

974 : bOwnsMemory(false),
975 iIntSize(iTmpInt), iDoubleSize(iTmpDouble),
976 iNumItems(iTmpInt/2),
977 piRowm1(0), piColm1(0),
978 pdMatm1(0)
979 {
980  ASSERT(piTmpIndex);
981  ASSERT(pdTmpMat);
982 
983  piRowm1 = piTmpIndex - 1;
985 
986  pdMatm1 = pdTmpMat - 1;
987 
988 #ifdef DEBUG
989  IsValid();
990 #endif /* DEBUG */
991 }
integer * piRowm1
Definition: submat.h:768
doublereal * pdMatm1
Definition: submat.h:772
#define ASSERT(expression)
Definition: colamd.c:977
integer * piColm1
Definition: submat.h:770
SparseSubMatrixHandler::SparseSubMatrixHandler ( integer  iTmpInt)

Definition at line 993 of file submat.cc.

References bOwnsMemory, iIntSize, iNumItems, pdMatm1, piColm1, piRowm1, and SAFENEWARR.

994 : iIntSize(2*iTmpInt), iDoubleSize(iTmpInt),
995 iNumItems(iTmpInt), piRowm1(0), piColm1(0), pdMatm1(0)
996 {
998  pdMatm1--;
999 
1001  piRowm1--;
1003 
1004  bOwnsMemory = true;
1005 }
integer * piRowm1
Definition: submat.h:768
doublereal * pdMatm1
Definition: submat.h:772
#define SAFENEWARR(pnt, item, sz)
Definition: mynewmem.h:701
integer * piColm1
Definition: submat.h:770
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
SparseSubMatrixHandler::~SparseSubMatrixHandler ( void  )
virtual

Definition at line 1011 of file submat.cc.

References bOwnsMemory, pdMatm1, piRowm1, and SAFEDELETEARR.

1012 {
1013  if (bOwnsMemory) {
1014  pdMatm1++;
1016 
1017  piRowm1++;
1019  }
1020 }
integer * piRowm1
Definition: submat.h:768
#define SAFEDELETEARR(pnt)
Definition: mynewmem.h:713
doublereal * pdMatm1
Definition: submat.h:772

Member Function Documentation

MatrixHandler & SparseSubMatrixHandler::AddTo ( MatrixHandler MH) const
virtual

Implements SubMatrixHandler.

Reimplemented in VariableSubMatrixHandler.

Definition at line 1415 of file submat.cc.

References ASSERT, MatrixHandler::iGetNumCols(), MatrixHandler::iGetNumRows(), iNumItems, pdMatm1, piColm1, and piRowm1.

Referenced by VariableSubMatrixHandler::AddTo().

1416 {
1417 #ifdef DEBUG
1418  IsValid();
1419  MH.IsValid();
1420 #endif /* DEBUG */
1421 
1422  for (integer i = iNumItems; i > 0; i--) {
1423  ASSERT(piRowm1[i] > 0);
1424  ASSERT(piRowm1[i] <= MH.iGetNumRows());
1425  ASSERT(piColm1[i] > 0);
1426  ASSERT(piColm1[i] <= MH.iGetNumCols());
1427 
1428  MH(piRowm1[i], piColm1[i]) += pdMatm1[i];
1429  }
1430 
1431  return MH;
1432 }
virtual integer iGetNumCols(void) const =0
integer * piRowm1
Definition: submat.h:768
doublereal * pdMatm1
Definition: submat.h:772
#define ASSERT(expression)
Definition: colamd.c:977
integer * piColm1
Definition: submat.h:770
long int integer
Definition: colamd.c:51
virtual integer iGetNumRows(void) const =0

Here is the call graph for this function:

MatrixHandler & SparseSubMatrixHandler::AddTo ( FullMatrixHandler MH) const

Definition at line 1459 of file submat.cc.

References ASSERT, FullMatrixHandler::iGetNumCols(), FullMatrixHandler::iGetNumRows(), iNumItems, pdMatm1, piColm1, piRowm1, and FullMatrixHandler::ppdColsm1.

1460 {
1461 #ifdef DEBUG
1462  IsValid();
1463  MH.IsValid();
1464 #endif /* DEBUG */
1465 
1466  doublereal **ppd = MH.ppdColsm1;
1467 
1468  for (integer i = iNumItems; i > 0; i--) {
1469  ASSERT(piRowm1[i] > 0);
1470  ASSERT(piRowm1[i] <= MH.iGetNumRows());
1471  ASSERT(piColm1[i] > 0);
1472  ASSERT(piColm1[i] <= MH.iGetNumCols());
1473 
1474  ppd[piColm1[i]][piRowm1[i]] += pdMatm1[i];
1475  }
1476 
1477  return MH;
1478 }
integer * piRowm1
Definition: submat.h:768
doublereal * pdMatm1
Definition: submat.h:772
#define ASSERT(expression)
Definition: colamd.c:977
virtual integer iGetNumCols(void) const
Definition: fullmh.h:229
doublereal ** ppdColsm1
Definition: fullmh.h:72
integer * piColm1
Definition: submat.h:770
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
virtual integer iGetNumRows(void) const
Definition: fullmh.h:225

Here is the call graph for this function:

MatrixHandler & SparseSubMatrixHandler::AddToT ( MatrixHandler MH) const
virtual

Implements SubMatrixHandler.

Reimplemented in VariableSubMatrixHandler.

Definition at line 1437 of file submat.cc.

References ASSERT, MatrixHandler::iGetNumCols(), MatrixHandler::iGetNumRows(), iNumItems, pdMatm1, piColm1, and piRowm1.

Referenced by VariableSubMatrixHandler::AddToT().

1438 {
1439 #ifdef DEBUG
1440  IsValid();
1441  MH.IsValid();
1442 #endif /* DEBUG */
1443 
1444  for (integer i = iNumItems; i > 0; i--) {
1445  ASSERT(piRowm1[i] > 0);
1446  ASSERT(piRowm1[i] <= MH.iGetNumCols());
1447  ASSERT(piColm1[i] > 0);
1448  ASSERT(piColm1[i] <= MH.iGetNumRows());
1449 
1450  MH(piColm1[i], piRowm1[i]) += pdMatm1[i];
1451  }
1452 
1453  return MH;
1454 }
virtual integer iGetNumCols(void) const =0
integer * piRowm1
Definition: submat.h:768
doublereal * pdMatm1
Definition: submat.h:772
#define ASSERT(expression)
Definition: colamd.c:977
integer * piColm1
Definition: submat.h:770
long int integer
Definition: colamd.c:51
virtual integer iGetNumRows(void) const =0

Here is the call graph for this function:

MatrixHandler & SparseSubMatrixHandler::AddToT ( FullMatrixHandler MH) const

Definition at line 1483 of file submat.cc.

References ASSERT, FullMatrixHandler::iGetNumCols(), FullMatrixHandler::iGetNumRows(), iNumItems, pdMatm1, piColm1, piRowm1, and FullMatrixHandler::ppdColsm1.

1484 {
1485 #ifdef DEBUG
1486  IsValid();
1487  MH.IsValid();
1488 #endif /* DEBUG */
1489 
1490  doublereal **ppd = MH.ppdColsm1;
1491 
1492  for (integer i = iNumItems; i > 0; i--) {
1493  ASSERT(piRowm1[i] > 0);
1494  ASSERT(piRowm1[i] <= MH.iGetNumCols());
1495  ASSERT(piColm1[i] > 0);
1496  ASSERT(piColm1[i] <= MH.iGetNumRows());
1497 
1498  ppd[piRowm1[i]][piColm1[i]] += pdMatm1[i];
1499  }
1500 
1501  return MH;
1502 }
integer * piRowm1
Definition: submat.h:768
doublereal * pdMatm1
Definition: submat.h:772
#define ASSERT(expression)
Definition: colamd.c:977
virtual integer iGetNumCols(void) const
Definition: fullmh.h:229
doublereal ** ppdColsm1
Definition: fullmh.h:72
integer * piColm1
Definition: submat.h:770
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
virtual integer iGetNumRows(void) const
Definition: fullmh.h:225

Here is the call graph for this function:

void SparseSubMatrixHandler::Attach ( int  iNumEntr,
doublereal pdTmpMat,
integer piTmpIndx 
)

Definition at line 1095 of file submat.cc.

References ASSERT, bOwnsMemory, iDoubleSize, iIntSize, iNumItems, pdMatm1, piColm1, piRowm1, and SAFEDELETEARR.

1097 {
1098  if (bOwnsMemory) {
1099  piRowm1++;
1101 
1102  pdMatm1++;
1104 
1105  bOwnsMemory = false;
1106  }
1107 
1108  ASSERT(iNumEntr > 0);
1109  ASSERT(piTmpIndx);
1110  ASSERT(pdTmpMat);
1111 
1112  iIntSize = iNumEntr*2;
1113  iDoubleSize = iNumEntr;
1114  iNumItems = iNumEntr;
1115  piRowm1 = piTmpIndx - 1;
1116  piColm1 = piRowm1 + iNumEntr;
1117  pdMatm1 = pdTmpMat - 1;
1118 
1119 #ifdef DEBUG
1120  IsValid();
1121 #endif /* DEBUG */
1122 }
integer * piRowm1
Definition: submat.h:768
#define SAFEDELETEARR(pnt)
Definition: mynewmem.h:713
doublereal * pdMatm1
Definition: submat.h:772
#define ASSERT(expression)
Definition: colamd.c:977
integer * piColm1
Definition: submat.h:770
void SparseSubMatrixHandler::DecCoef ( integer  iSubIt,
integer  iDmy,
const doublereal dCoef 
)
inlinevirtual

Reimplemented from MatrixHandler.

Definition at line 884 of file submat.h.

References ASSERT, iNumItems, and pdMatm1.

884  {
885 #ifdef DEBUG
886  IsValid();
887 #endif /* DEBUG */
888 
889  ASSERT((iSubIt > 0) && (iSubIt <= iNumItems));
890  pdMatm1[iSubIt] -= dCoef;
891  };
doublereal * pdMatm1
Definition: submat.h:772
#define ASSERT(expression)
Definition: colamd.c:977
const doublereal& SparseSubMatrixHandler::dGetCoef ( integer  iSubIt,
integer  iDmy 
) const
inlinevirtual

Reimplemented from MatrixHandler.

Definition at line 897 of file submat.h.

References ASSERT, iNumItems, and pdMatm1.

Referenced by testSubVecAss(), and testSubVecAssMatVec().

897  {
898 #ifdef DEBUG
899  IsValid();
900 #endif /* DEBUG */
901 
902  ASSERT((iSubIt > 0) && (iSubIt <= iNumItems));
903 
904  return pdMatm1[iSubIt];
905  };
doublereal * pdMatm1
Definition: submat.h:772
#define ASSERT(expression)
Definition: colamd.c:977
integer SparseSubMatrixHandler::iGetColIndex ( integer  iSubIt) const
inlinevirtual

Implements SubMatrixHandler.

Definition at line 979 of file submat.h.

References ASSERT, iNumItems, and piColm1.

Referenced by testSubVecAss(), and testSubVecAssMatVec().

979  {
980 #ifdef DEBUG
981  IsValid();
982 #endif /* DEBUG */
983 
984  ASSERT((iSubIt > 0) && (iSubIt <= iNumItems));
985 
986  return piColm1[iSubIt];
987  };
#define ASSERT(expression)
Definition: colamd.c:977
integer * piColm1
Definition: submat.h:770
integer SparseSubMatrixHandler::iGetNumCols ( void  ) const
inlinevirtual

Implements MatrixHandler.

Definition at line 821 of file submat.h.

821  {
822  return 1;
823  };
integer SparseSubMatrixHandler::iGetNumRows ( void  ) const
inlinevirtual

Implements MatrixHandler.

Definition at line 812 of file submat.h.

References iNumItems.

Referenced by testSubVecAss(), and testSubVecAssMatVec().

812  {
813  return iNumItems;
814  };
integer SparseSubMatrixHandler::iGetRowIndex ( integer  iSubIt) const
inlinevirtual

Implements SubMatrixHandler.

Definition at line 965 of file submat.h.

References ASSERT, iNumItems, and piRowm1.

Referenced by testSubVecAss(), and testSubVecAssMatVec().

965  {
966 #ifdef DEBUG
967  IsValid();
968 #endif /* DEBUG */
969 
970  ASSERT((iSubIt > 0) && (iSubIt <= iNumItems));
971 
972  return piRowm1[iSubIt];
973  };
integer * piRowm1
Definition: submat.h:768
#define ASSERT(expression)
Definition: colamd.c:977
void SparseSubMatrixHandler::IncCoef ( integer  iSubIt,
integer  iDmy,
const doublereal dCoef 
)
inlinevirtual

Reimplemented from MatrixHandler.

Definition at line 871 of file submat.h.

References ASSERT, iNumItems, and pdMatm1.

871  {
872 #ifdef DEBUG
873  IsValid();
874 #endif /* DEBUG */
875 
876  ASSERT((iSubIt > 0) && (iSubIt <= iNumItems));
877  pdMatm1[iSubIt] += dCoef;
878  };
doublereal * pdMatm1
Definition: submat.h:772
#define ASSERT(expression)
Definition: colamd.c:977
const doublereal& SparseSubMatrixHandler::operator() ( integer  iSubIt,
integer  iDmy 
) const
inlinevirtual

Implements MatrixHandler.

Reimplemented in VariableSubMatrixHandler.

Definition at line 911 of file submat.h.

References ASSERT, iNumItems, and pdMatm1.

911  {
912 #ifdef DEBUG
913  IsValid();
914 #endif /* DEBUG */
915 
916  ASSERT((iSubIt > 0) && (iSubIt <= iNumItems));
917 
918  return pdMatm1[iSubIt];
919  };
doublereal * pdMatm1
Definition: submat.h:772
#define ASSERT(expression)
Definition: colamd.c:977
doublereal& SparseSubMatrixHandler::operator() ( integer  iSubIt,
integer  iDmy 
)
inlinevirtual

Implements MatrixHandler.

Reimplemented in VariableSubMatrixHandler.

Definition at line 925 of file submat.h.

References ASSERT, iNumItems, and pdMatm1.

925  {
926 #ifdef DEBUG
927  IsValid();
928 #endif /* DEBUG */
929 
930  ASSERT((iSubIt > 0) && (iSubIt <= iNumItems));
931 
932  return pdMatm1[iSubIt];
933  };
doublereal * pdMatm1
Definition: submat.h:772
#define ASSERT(expression)
Definition: colamd.c:977
void SparseSubMatrixHandler::PutCoef ( integer  iSubIt,
integer  iDmy,
const doublereal dCoef 
)
inlinevirtual

Reimplemented from MatrixHandler.

Definition at line 857 of file submat.h.

References ASSERT, iNumItems, and pdMatm1.

857  {
858 #ifdef DEBUG
859  IsValid();
860 #endif /* DEBUG */
861 
862  ASSERT((iSubIt > 0) && (iSubIt <= iNumItems));
863 
864  pdMatm1[iSubIt] = dCoef;
865  };
doublereal * pdMatm1
Definition: submat.h:772
#define ASSERT(expression)
Definition: colamd.c:977
void SparseSubMatrixHandler::PutColIndex ( integer  iSubIt,
integer  iCol 
)
inlinevirtual

Implements SubMatrixHandler.

Definition at line 952 of file submat.h.

References ASSERT, iNumItems, and piColm1.

952  {
953 #ifdef DEBUG
954  IsValid();
955 #endif /* DEBUG */
956 
957  ASSERT((iSubIt > 0) && (iSubIt <= iNumItems));
958  piColm1[iSubIt] = iCol;
959  };
#define ASSERT(expression)
Definition: colamd.c:977
integer * piColm1
Definition: submat.h:770
void SparseSubMatrixHandler::PutCross ( integer  iSubIt,
integer  iFirstRow,
integer  iFirstCol,
const Vec3 v 
)

Definition at line 1236 of file submat.cc.

References ASSERT, iNumItems, pdMatm1, Vec3::pGetVec(), piColm1, piRowm1, V1, V2, and V3.

Referenced by InLineJoint::AssJac(), SphericalHingeJoint::AssJac(), InPlaneJoint::AssJac(), ContactJoint::AssJac(), AutomaticStructDispElem::AssJac(), InLineWithOffsetJoint::AssJac(), AngularVelocityJoint::AssJac(), DistanceJointWithOffset::AssJac(), PinJoint::AssJac(), InPlaneWithOffsetJoint::AssJac(), AutomaticStructElem::AssJac(), PlanePinJoint::AssJac(), AutomaticStructElem::AssMats(), and AngularVelocityJoint::InitialAssJac().

1238 {
1239 #ifdef DEBUG
1240  IsValid();
1241 
1242  ASSERT(iNumItems >= 6);
1243  ASSERT(iSubIt > 0);
1244  ASSERT(iSubIt <= iNumItems - 5);
1245  ASSERT(iFirstRow >= 0);
1246  ASSERT(iFirstCol >= 0);
1247 #endif /* DEBUG */
1248 
1249  /* Attenzione agli argomenti:
1250  * iSubIt e' il primo indice della matrice da utilizzare,
1251  * con 1 <= iSubit <= iCurSize;
1252  * iFirstRow e' il primo indice di riga -1, ovvero il
1253  * primo indice di riga della sottomatrice v/\ piena e' iFirstRow+1
1254  * iFirstCol e' il primo indice di colonna -1, ovvero il
1255  * primo indice di colonna della sottomatrice v/\ piena e' iFirstCol+1
1256  * v e' il vettore che genera v/\ */
1257 
1258  /* Matrice v/\ :
1259  *
1260  * 1 2 3
1261  *
1262  * 1 | 0 -v3 v2 |
1263  * 2 | v3 0 -v1 |
1264  * 3 | -v2 v1 0 |
1265  */
1266 
1267  /* assume che il Vec3 sia un'array di 3 reali */
1268  const doublereal* pdFrom = v.pGetVec();
1269 
1270  /* Coefficiente 1,2 */
1271  doublereal* pdm = pdMatm1 + iSubIt;
1272  integer* pir = piRowm1 + iSubIt;
1273  integer* pic = piColm1 + iSubIt;
1274 
1275  pdm[0] = -pdFrom[V3]; // -v.dGet(3);
1276  pir[0] = iFirstRow + 1;
1277  pic[0] = iFirstCol + 2;
1278 
1279  /* Coefficiente 1,3 */
1280  pdm[1] = pdFrom[V2]; // v.dGet(2);
1281  pir[1] = iFirstRow + 1;
1282  pic[1] = iFirstCol + 3;
1283 
1284  /* Coefficiente 2,1 */
1285  pdm[2] = pdFrom[V3]; // v.dGet(3);
1286  pir[2] = iFirstRow + 2;
1287  pic[2] = iFirstCol + 1;
1288 
1289  /* Coefficiente 2,3 */
1290  pdm[3] = -pdFrom[V1]; // -v.dGet(1);
1291  pir[3] = iFirstRow + 2;
1292  pic[3] = iFirstCol + 3;
1293 
1294  /* Coefficiente 3,1 */
1295  pdm[4] = -pdFrom[V2]; // -v.dGet(2);
1296  pir[4] = iFirstRow + 3;
1297  pic[4] = iFirstCol + 1;
1298 
1299  /* Coefficiente 3,2 */
1300  pdm[5] = pdFrom[V1]; // v.dGet(1);
1301  pir[5] = iFirstRow + 3;
1302  pic[5] = iFirstCol + 2;
1303 }
integer * piRowm1
Definition: submat.h:768
doublereal * pdMatm1
Definition: submat.h:772
Definition: matvec3.h:50
Definition: matvec3.h:51
#define ASSERT(expression)
Definition: colamd.c:977
Definition: matvec3.h:49
const doublereal * pGetVec(void) const
Definition: matvec3.h:192
integer * piColm1
Definition: submat.h:770
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

void SparseSubMatrixHandler::PutDiag ( integer  iSubIt,
integer  iFirstRow,
integer  iFirstCol,
const Vec3 v 
)

Definition at line 1125 of file submat.cc.

References ASSERT, iNumItems, pdMatm1, Vec3::pGetVec(), piColm1, piRowm1, V1, V2, and V3.

Referenced by SphericalHingeJoint::AssJac().

1127 {
1128 #ifdef DEBUG
1129  IsValid();
1130 
1131  ASSERT(iNumItems >= 3);
1132  ASSERT(iSubIt > 0);
1133  ASSERT(iSubIt <= iNumItems - 2);
1134  ASSERT(iFirstRow >= 0);
1135  ASSERT(iFirstCol >= 0);
1136 #endif /* DEBUG */
1137 
1138  /*
1139  * Attenzione agli argomenti:
1140  * iSubIt e' il primo indice della matrice da utilizzare,
1141  * con 1 <= iSubit <= iCurSize;
1142  * iFirstRow e' il primo indice di riga -1, ovvero il primo indice
1143  * di riga della sottomatrice diag(v) piena e' iFirstRow + 1
1144  * iFirstCol e' il primo indice di colonna -1, ovvero il primo indice
1145  * di colonna della sottomatrice diag(v) piena e' iFirstCol + 1
1146  * v e' il vettore che genera diag(v)
1147  */
1148 
1149  /* Matrice diag(v) :
1150  *
1151  * 1 2 3
1152  *
1153  * 1 | v1 0 0 |
1154  * 2 | 0 v2 0 |
1155  * 3 | 0 0 v3 |
1156  */
1157 
1158  /* assume che il Vec3 sia un'array di 3 reali */
1159  const doublereal* pdFrom = v.pGetVec();
1160 
1161  doublereal* pdm = pdMatm1 + iSubIt;
1162  integer* pir = piRowm1 + iSubIt;
1163  integer* pic = piColm1 + iSubIt;
1164 
1165  /* Coefficiente 1,1 */
1166  pdm[0] = pdFrom[V1];
1167  pir[0] = iFirstRow + 1;
1168  pic[0] = iFirstCol + 1;
1169 
1170  /* Coefficiente 2,2 */
1171  pdm[1] = pdFrom[V2];
1172  pir[1] = iFirstRow + 2;
1173  pic[1] = iFirstCol + 2;
1174 
1175  /* Coefficiente 3,3 */
1176  pdm[2] = pdFrom[V3];
1177  pir[2] = iFirstRow + 3;
1178  pic[2] = iFirstCol + 3;
1179 }
integer * piRowm1
Definition: submat.h:768
doublereal * pdMatm1
Definition: submat.h:772
Definition: matvec3.h:50
Definition: matvec3.h:51
#define ASSERT(expression)
Definition: colamd.c:977
Definition: matvec3.h:49
const doublereal * pGetVec(void) const
Definition: matvec3.h:192
integer * piColm1
Definition: submat.h:770
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

void SparseSubMatrixHandler::PutDiag ( integer  iSubIt,
integer  iFirstRow,
integer  iFirstCol,
const doublereal d 
)

Definition at line 1183 of file submat.cc.

References ASSERT, iNumItems, pdMatm1, piColm1, and piRowm1.

1185 {
1186 #ifdef DEBUG
1187  IsValid();
1188 
1189  ASSERT(iNumItems >= 3);
1190  ASSERT(iSubIt > 0);
1191  ASSERT(iSubIt <= iNumItems - 2);
1192  ASSERT(iFirstRow >= 0);
1193  ASSERT(iFirstCol >= 0);
1194 #endif /* DEBUG */
1195 
1196  /* Attenzione agli argomenti:
1197  * iSubIt e' il primo indice della matrice da utilizzare,
1198  * con 1 <= iSubit <= iCurSize;
1199  * iFirstRow e' il primo indice di riga -1, ovvero il
1200  * primo indice di riga della sottomatrice I*d piena e' iFirstRow+1
1201  * iFirstCol e' il primo indice di colonna -1, ovvero il
1202  * primo indice di colonna della sottomatrice I*d piena e' iFirstCol+1
1203  * v e' il vettore che genera I*d */
1204 
1205  /* Matrice I*d :
1206  *
1207  * 1 2 3
1208  *
1209  * 1 | d 0 0 |
1210  * 2 | 0 d 0 |
1211  * 3 | 0 0 d |
1212  */
1213 
1214  doublereal* pdm = pdMatm1 + iSubIt;
1215  integer* pir = piRowm1 + iSubIt;
1216  integer* pic = piColm1 + iSubIt;
1217 
1218  /* Coefficiente 1,1 */
1219  pdm[0] = d;
1220  pir[0] = iFirstRow + 1;
1221  pic[0] = iFirstCol + 1;
1222 
1223  /* Coefficiente 2,2 */
1224  pdm[1] = d;
1225  pir[1] = iFirstRow + 2;
1226  pic[1] = iFirstCol + 2;
1227 
1228  /* Coefficiente 3,3 */
1229  pdm[2] = d;
1230  pir[2] = iFirstRow + 3;
1231  pic[2] = iFirstCol + 3;
1232 }
integer * piRowm1
Definition: submat.h:768
doublereal * pdMatm1
Definition: submat.h:772
#define ASSERT(expression)
Definition: colamd.c:977
integer * piColm1
Definition: submat.h:770
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
void SparseSubMatrixHandler::PutItem ( integer  iSubIt,
integer  iRow,
integer  iCol,
const doublereal dCoef 
)
inline

Definition at line 997 of file submat.h.

References ASSERT, iNumItems, pdMatm1, piColm1, and piRowm1.

Referenced by DispMeasure::AssJac(), Accelerometer::AssJac(), LinearAccelerationJoint::AssJac(), GenelClamp::AssJac(), InLineJoint::AssJac(), LinearVelocityJoint::AssJac(), DistanceJoint::AssJac(), DrivenElem::AssJac(), InPlaneJoint::AssJac(), ContactJoint::AssJac(), SwashPlate::AssJac(), TikhonovRegularization::AssJac(), RotorTrimBase::AssJac(), TranslAccel::AssJac(), GenelDistance::AssJac(), AutomaticStructDispElem::AssJac(), AngularAccelerationJoint::AssJac(), AngularVelocityJoint::AssJac(), ModuleNonsmoothNode::AssJac(), InLineWithOffsetJoint::AssJac(), DynamicRegularization::AssJac(), DistanceJointWithOffset::AssJac(), RotAccel::AssJac(), PinJoint::AssJac(), InPlaneWithOffsetJoint::AssJac(), JacobianRegularization::AssJac(), AutomaticStructElem::AssJac(), ClampJoint::AssJac(), GenelMass::AssJac(), PlanePinJoint::AssJac(), DynamicInflowRotor::AssJac(), PetersHeRotor::AssJac(), DrivenElem::AssMats(), AutomaticStructDispElem::AssMats(), AutomaticStructElem::AssMats(), DistanceJoint::InitialAssJac(), LinearVelocityJoint::InitialAssJac(), TikhonovRegularization::InitialAssJac(), DynamicRegularization::InitialAssJac(), AngularVelocityJoint::InitialAssJac(), JacobianRegularization::InitialAssJac(), and ClampJoint::InitialAssJac().

998  {
999 #ifdef DEBUG
1000  IsValid();
1001 #endif /* DEBUG */
1002 
1003  ASSERT((iSubIt > 0) && (iSubIt <= iNumItems));
1004  ASSERT(iRow > 0);
1005  ASSERT(iCol > 0);
1006 
1007  pdMatm1[iSubIt] = dCoef;
1008  piRowm1[iSubIt] = iRow;
1009  piColm1[iSubIt] = iCol;
1010  };
integer * piRowm1
Definition: submat.h:768
doublereal * pdMatm1
Definition: submat.h:772
#define ASSERT(expression)
Definition: colamd.c:977
integer * piColm1
Definition: submat.h:770
void SparseSubMatrixHandler::PutMat3x3 ( integer  iSubIt,
integer  iFirstRow,
integer  iFirstCol,
const Mat3x3 m 
)

Definition at line 1331 of file submat.cc.

References ASSERT, iNumItems, M11, M12, M13, M21, M22, M23, M31, M32, M33, pdMatm1, Mat3x3::pGetMat(), piColm1, and piRowm1.

Referenced by InLineJoint::AssJac(), SphericalHingeJoint::AssJac(), InPlaneJoint::AssJac(), InLineWithOffsetJoint::AssJac(), DistanceJointWithOffset::AssJac(), PinJoint::AssJac(), InPlaneWithOffsetJoint::AssJac(), and PlanePinJoint::AssJac().

1333 {
1334 #ifdef DEBUG
1335  IsValid();
1336 
1337  ASSERT(iNumItems >= 9);
1338  ASSERT(iSubIt > 0);
1339  ASSERT(iSubIt <= iNumItems - 8);
1340  ASSERT(iFirstRow >= 0);
1341  ASSERT(iFirstCol >= 0);
1342 #endif /* DEBUG */
1343 
1344  /* Attenzione agli argomenti:
1345  * iSubIt e' il primo indice della matrice da utilizzare,
1346  * con 1 <= iSubit <= iCurSize;
1347  * iFirstRow e' il primo indice di riga -1, ovvero il
1348  * primo indice di riga della sottomatrice v/\ piena e' iFirstRow+1
1349  * iFirstCol e' il primo indice di colonna -1, ovvero il
1350  * primo indice di colonna della sottomatrice m piena e' iFirstCol+1
1351  */
1352 
1353  /* Per efficienza, vengono scritte esplicitamente tutte
1354  * le assegnazioni;
1355  * la funzione quindi non e' messa in linea intenzionalmente */
1356 
1357  /* Coefficienti 1,1-3,1 */
1358  doublereal* pdFrom = (doublereal*)m.pGetMat();
1359  doublereal* pdTmpMat = pdMatm1 + iSubIt;
1360  integer* piTmpRow = piRowm1 + iSubIt;
1361  integer* piTmpCol = piColm1 + iSubIt;
1362 
1363  iFirstRow++;
1364  iFirstCol++;
1365 
1366  /* Prima riga */
1367  pdTmpMat[0] = pdFrom[M11];
1368  piTmpRow[0] = iFirstRow++;
1369  piTmpCol[0] = iFirstCol;
1370 
1371  pdTmpMat[1] = pdFrom[M21];
1372  piTmpRow[1] = iFirstRow++;
1373  piTmpCol[1] = iFirstCol;
1374 
1375  pdTmpMat[2] = pdFrom[M31];
1376  piTmpRow[2] = iFirstRow;
1377  piTmpCol[2] = iFirstCol;
1378 
1379  /* Seconda riga */
1380  iFirstRow -= 2;
1381  iFirstCol++;
1382 
1383  pdTmpMat[3] = pdFrom[M12];
1384  piTmpRow[3] = iFirstRow++;
1385  piTmpCol[3] = iFirstCol;
1386 
1387  pdTmpMat[4] = pdFrom[M22];
1388  piTmpRow[4] = iFirstRow++;
1389  piTmpCol[4] = iFirstCol;
1390 
1391  pdTmpMat[5] = pdFrom[M32];
1392  piTmpRow[5] = iFirstRow;
1393  piTmpCol[5] = iFirstCol;
1394 
1395  /* Terza riga */
1396  iFirstRow -= 2;
1397  iFirstCol++;
1398 
1399  pdTmpMat[6] = pdFrom[M13];
1400  piTmpRow[6] = iFirstRow++;
1401  piTmpCol[6] = iFirstCol;
1402 
1403  pdTmpMat[7] = pdFrom[M23];
1404  piTmpRow[7] = iFirstRow++;
1405  piTmpCol[7] = iFirstCol;
1406 
1407  pdTmpMat[8] = pdFrom[M33];
1408  piTmpRow[8] = iFirstRow;
1409  piTmpCol[8] = iFirstCol;
1410 }
integer * piRowm1
Definition: submat.h:768
Definition: matvec3.h:59
doublereal * pdMatm1
Definition: submat.h:772
Definition: matvec3.h:58
Definition: matvec3.h:55
Definition: matvec3.h:56
Definition: matvec3.h:63
Definition: matvec3.h:62
Definition: matvec3.h:61
Definition: matvec3.h:57
#define ASSERT(expression)
Definition: colamd.c:977
const doublereal * pGetMat(void) const
Definition: matvec3.h:743
Definition: matvec3.h:60
integer * piColm1
Definition: submat.h:770
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51

Here is the call graph for this function:

void SparseSubMatrixHandler::PutRowIndex ( integer  iSubIt,
integer  iRow 
)
inlinevirtual

Implements SubMatrixHandler.

Definition at line 939 of file submat.h.

References ASSERT, iNumItems, and piRowm1.

939  {
940 #ifdef DEBUG
941  IsValid();
942 #endif /* DEBUG */
943 
944  ASSERT((iSubIt > 0) && (iSubIt <= iNumItems));
945  piRowm1[iSubIt] = iRow;
946  };
integer * piRowm1
Definition: submat.h:768
#define ASSERT(expression)
Definition: colamd.c:977
void SparseSubMatrixHandler::Reset ( void  )
virtual

Implements MatrixHandler.

Definition at line 1307 of file submat.cc.

References ASSERT, iNumItems, and pdMatm1.

Referenced by ResizeReset().

1308 {
1309 #ifdef DEBUG
1310  IsValid();
1311 #endif /* DEBUG */
1312 
1313  ASSERT(iNumItems > 0);
1314 
1315 #if defined HAVE_MEMSET
1316  memset(pdMatm1 + 1, 0, iNumItems*sizeof(doublereal));
1317 #else /* !HAVE_MEMSET */
1318  for (integer i = iNumItems; i > 0; i--) {
1319  pdMatm1[i] = 0.;
1320  }
1321 #endif /* HAVE_MEMSET */
1322 }
doublereal * pdMatm1
Definition: submat.h:772
#define ASSERT(expression)
Definition: colamd.c:977
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
void SparseSubMatrixHandler::Resize ( integer  iNewRow,
integer  iNewCol 
)
virtual

Implements SubMatrixHandler.

Definition at line 1053 of file submat.cc.

References ASSERT, iDoubleSize, iIntSize, iNumItems, MBDYN_EXCEPT_ARGS, and piRowm1.

Referenced by LinearAccelerationJoint::AssJac(), GenelClamp::AssJac(), ContactJoint::AssJac(), RotorTrimBase::AssJac(), AngularAccelerationJoint::AssJac(), and ResizeReset().

1054 {
1055 #ifdef DEBUG
1056  IsValid();
1057 #endif /* DEBUG */
1058 
1059  ASSERT(iNewRow > 0);
1060  ASSERT(2*iNewRow <= iIntSize);
1061  ASSERT(iNewRow <= iDoubleSize);
1062  ASSERT(piRowm1 != NULL);
1063 
1064  if (iNewRow <= 0
1065  || 2*iNewRow > iIntSize
1066  || iNewRow > iDoubleSize) {
1067  silent_cerr("SparseSubMatrixHandler::Resize() - error"
1068  << std::endl);
1070  }
1071 
1072  iNumItems = iNewRow;
1073 
1074 #ifdef DEBUG
1075  IsValid();
1076 #endif /* DEBUG */
1077 }
integer * piRowm1
Definition: submat.h:768
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
#define ASSERT(expression)
Definition: colamd.c:977
void SparseSubMatrixHandler::ResizeReset ( integer  iNewRow,
integer  iNewCol 
)
virtual

Implements SubMatrixHandler.

Definition at line 1084 of file submat.cc.

References Reset(), and Resize().

Referenced by DispMeasure::AssJac(), Accelerometer::AssJac(), InLineJoint::AssJac(), LinearVelocityJoint::AssJac(), DistanceJoint::AssJac(), DrivenElem::AssJac(), SphericalHingeJoint::AssJac(), InPlaneJoint::AssJac(), SwashPlate::AssJac(), TikhonovRegularization::AssJac(), TranslAccel::AssJac(), GenelDistance::AssJac(), AutomaticStructDispElem::AssJac(), ModuleNonsmoothNode::AssJac(), InLineWithOffsetJoint::AssJac(), AngularVelocityJoint::AssJac(), DynamicRegularization::AssJac(), DistanceJointWithOffset::AssJac(), RotAccel::AssJac(), PinJoint::AssJac(), InPlaneWithOffsetJoint::AssJac(), JacobianRegularization::AssJac(), AutomaticStructElem::AssJac(), ClampJoint::AssJac(), GenelMass::AssJac(), PlanePinJoint::AssJac(), DynamicInflowRotor::AssJac(), PetersHeRotor::AssJac(), DrivenElem::AssMats(), AutomaticStructDispElem::AssMats(), AutomaticStructElem::AssMats(), DistanceJoint::InitialAssJac(), LinearVelocityJoint::InitialAssJac(), TikhonovRegularization::InitialAssJac(), DynamicRegularization::InitialAssJac(), AngularVelocityJoint::InitialAssJac(), JacobianRegularization::InitialAssJac(), and ClampJoint::InitialAssJac().

1085 {
1086  Resize(iNewRow, iNewCol);
1087  Reset();
1088 }
void Resize(integer iNewRow, integer iNewCol)
Definition: submat.cc:1053

Here is the call graph for this function:

MatrixHandler & SparseSubMatrixHandler::SubFrom ( MatrixHandler MH) const
virtual

Implements SubMatrixHandler.

Reimplemented in VariableSubMatrixHandler.

Definition at line 1507 of file submat.cc.

References ASSERT, MatrixHandler::iGetNumCols(), MatrixHandler::iGetNumRows(), iNumItems, pdMatm1, piColm1, and piRowm1.

Referenced by VariableSubMatrixHandler::SubFrom().

1508 {
1509 #ifdef DEBUG
1510  IsValid();
1511  MH.IsValid();
1512 #endif /* DEBUG */
1513 
1514  for (integer i = iNumItems; i > 0; i--) {
1515  ASSERT(piRowm1[i] > 0);
1516  ASSERT(piRowm1[i] <= MH.iGetNumRows());
1517  ASSERT(piColm1[i] > 0);
1518  ASSERT(piColm1[i] <= MH.iGetNumCols());
1519 
1520  MH(piRowm1[i], piColm1[i]) -= pdMatm1[i];
1521  }
1522 
1523  return MH;
1524 }
virtual integer iGetNumCols(void) const =0
integer * piRowm1
Definition: submat.h:768
doublereal * pdMatm1
Definition: submat.h:772
#define ASSERT(expression)
Definition: colamd.c:977
integer * piColm1
Definition: submat.h:770
long int integer
Definition: colamd.c:51
virtual integer iGetNumRows(void) const =0

Here is the call graph for this function:

MatrixHandler & SparseSubMatrixHandler::SubFrom ( FullMatrixHandler MH) const

Definition at line 1551 of file submat.cc.

References ASSERT, FullMatrixHandler::iGetNumCols(), FullMatrixHandler::iGetNumRows(), iNumItems, pdMatm1, piColm1, piRowm1, and FullMatrixHandler::ppdColsm1.

1552 {
1553 #ifdef DEBUG
1554  IsValid();
1555  MH.IsValid();
1556 #endif /* DEBUG */
1557 
1558  doublereal **ppd = MH.ppdColsm1;
1559 
1560  for (integer i = iNumItems; i > 0; i--) {
1561  ASSERT(piRowm1[i] > 0);
1562  ASSERT(piRowm1[i] <= MH.iGetNumRows());
1563  ASSERT(piColm1[i] > 0);
1564  ASSERT(piColm1[i] <= MH.iGetNumCols());
1565 
1566  ppd[piColm1[i]][piRowm1[i]] -= pdMatm1[i];
1567  }
1568 
1569  return MH;
1570 }
integer * piRowm1
Definition: submat.h:768
doublereal * pdMatm1
Definition: submat.h:772
#define ASSERT(expression)
Definition: colamd.c:977
virtual integer iGetNumCols(void) const
Definition: fullmh.h:229
doublereal ** ppdColsm1
Definition: fullmh.h:72
integer * piColm1
Definition: submat.h:770
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
virtual integer iGetNumRows(void) const
Definition: fullmh.h:225

Here is the call graph for this function:

MatrixHandler & SparseSubMatrixHandler::SubFromT ( MatrixHandler MH) const
virtual

Implements SubMatrixHandler.

Reimplemented in VariableSubMatrixHandler.

Definition at line 1529 of file submat.cc.

References ASSERT, MatrixHandler::iGetNumCols(), MatrixHandler::iGetNumRows(), iNumItems, pdMatm1, piColm1, and piRowm1.

Referenced by VariableSubMatrixHandler::SubFromT().

1530 {
1531 #ifdef DEBUG
1532  IsValid();
1533  MH.IsValid();
1534 #endif /* DEBUG */
1535 
1536  for (integer i = iNumItems; i > 0; i--) {
1537  ASSERT(piRowm1[i] > 0);
1538  ASSERT(piRowm1[i] <= MH.iGetNumCols());
1539  ASSERT(piColm1[i] > 0);
1540  ASSERT(piColm1[i] <= MH.iGetNumRows());
1541 
1542  MH(piColm1[i], piRowm1[i]) -= pdMatm1[i];
1543  }
1544 
1545  return MH;
1546 }
virtual integer iGetNumCols(void) const =0
integer * piRowm1
Definition: submat.h:768
doublereal * pdMatm1
Definition: submat.h:772
#define ASSERT(expression)
Definition: colamd.c:977
integer * piColm1
Definition: submat.h:770
long int integer
Definition: colamd.c:51
virtual integer iGetNumRows(void) const =0

Here is the call graph for this function:

MatrixHandler & SparseSubMatrixHandler::SubFromT ( FullMatrixHandler MH) const

Definition at line 1574 of file submat.cc.

References ASSERT, FullMatrixHandler::iGetNumCols(), FullMatrixHandler::iGetNumRows(), iNumItems, pdMatm1, piColm1, piRowm1, and FullMatrixHandler::ppdColsm1.

1575 {
1576 #ifdef DEBUG
1577  IsValid();
1578  MH.IsValid();
1579 #endif /* DEBUG */
1580 
1581  doublereal **ppd = MH.ppdColsm1;
1582 
1583  for (integer i = iNumItems; i > 0; i--) {
1584  ASSERT(piRowm1[i] > 0);
1585  ASSERT(piRowm1[i] <= MH.iGetNumCols());
1586  ASSERT(piColm1[i] > 0);
1587  ASSERT(piColm1[i] <= MH.iGetNumRows());
1588 
1589  ppd[piRowm1[i]][piColm1[i]] -= pdMatm1[i];
1590  }
1591 
1592  return MH;
1593 }
integer * piRowm1
Definition: submat.h:768
doublereal * pdMatm1
Definition: submat.h:772
#define ASSERT(expression)
Definition: colamd.c:977
virtual integer iGetNumCols(void) const
Definition: fullmh.h:229
doublereal ** ppdColsm1
Definition: fullmh.h:72
integer * piColm1
Definition: submat.h:770
double doublereal
Definition: colamd.c:52
long int integer
Definition: colamd.c:51
virtual integer iGetNumRows(void) const
Definition: fullmh.h:225

Here is the call graph for this function:

Friends And Related Function Documentation

friend class FullMatrixHandler
friend

Definition at line 746 of file submat.h.

friend class NaiveMatrixHandler
friend

Definition at line 747 of file submat.h.

friend class NaivePermMatrixHandler
friend

Definition at line 748 of file submat.h.

friend class SparseMatrixHandler
friend

Definition at line 745 of file submat.h.

Member Data Documentation

bool SparseSubMatrixHandler::bOwnsMemory
private

Definition at line 759 of file submat.h.

Referenced by Attach(), SparseSubMatrixHandler(), and ~SparseSubMatrixHandler().

integer SparseSubMatrixHandler::iDoubleSize
private

Definition at line 763 of file submat.h.

Referenced by Attach(), and Resize().

integer SparseSubMatrixHandler::iIntSize
private

Definition at line 761 of file submat.h.

Referenced by Attach(), Resize(), and SparseSubMatrixHandler().


The documentation for this class was generated from the following files: