Jpp  master_rocky-43-ge265d140c
the software that should make you happy
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
JMATH::JMatrixND Struct Reference

NxN matrix. More...

#include <JMatrixND.hh>

Inheritance diagram for JMATH::JMatrixND:
JMATH::JMatrixND_t JMATH::JMath< JMatrixND > JLANG::JEquals< JFirst_t, JSecond_t > JMATH::JMatrixNS JFIT::JMatrixNZ

Public Member Functions

 JMatrixND ()
 Default constructor. More...
 
 JMatrixND (const size_t size)
 Constructor. More...
 
 JMatrixND (const JMatrixND &A)
 Copy constructor. More...
 
 JMatrixND (JMatrixND &&A)
 Move constructor. More...
 
JMatrixNDoperator= (const JMatrixND &A)
 Assignment operator. More...
 
JMatrixNDoperator= (JMatrixND &&A)
 Move assignment operator. More...
 
void resize (const size_t size)
 Resize matrix. More...
 
JMatrixNDreset ()
 Set matrix to the null matrix. More...
 
JMatrixNDsetIdentity ()
 Set to identity matrix. More...
 
JMatrixNDnegate ()
 Negate matrix. More...
 
JMatrixNDadd (const JMatrixND &A)
 Matrix addition. More...
 
JMatrixNDsub (const JMatrixND &A)
 Matrix subtraction. More...
 
JMatrixNDmul (const double factor)
 Scale matrix. More...
 
JMatrixNDdiv (const double factor)
 Scale matrix. More...
 
JMatrixNDmul (const JMatrixND &A, const JMatrixND &B)
 Matrix multiplication. More...
 
bool equals (const JMatrixND &A, const double eps=std::numeric_limits< double >::min()) const
 Equality. More...
 
bool isIdentity (const double eps=std::numeric_limits< double >::min()) const
 Test identity. More...
 
bool isSymmetric (const double eps=std::numeric_limits< double >::min()) const
 Test symmetry. More...
 
double getDot (const JVectorND &v) const
 Get dot product. More...
 
void clear ()
 Clear memory. More...
 
void set (const JMatrixND_t &A)
 Set matrix. More...
 
void swap (JMatrixND_t &A)
 Swap matrices. More...
 
JMatrixND_ttranspose ()
 Transpose. More...
 
size_t size () const
 Get dimension of matrix. More...
 
size_t capacity () const
 Get capacity of dimension. More...
 
bool empty () const
 Check emptyness. More...
 
const double * data () const
 Get pointer to data. More...
 
double * data ()
 Get pointer to data. More...
 
const double * operator[] (size_t row) const
 Get row data. More...
 
double * operator[] (size_t row)
 Get row data. More...
 
double operator() (const size_t row, const size_t col) const
 Get matrix element. More...
 
double & operator() (const size_t row, const size_t col)
 Get matrix element. More...
 
double at (size_t row, size_t col) const
 Get matrix element. More...
 
double & at (size_t row, size_t col)
 Get matrix element. More...
 
JMatrixNDmul (const JSecond_t &object)
 Multiply with object. More...
 

Protected Member Functions

JMatrixND_tgetInstance ()
 Get work space. More...
 
void rswap (size_t r1, size_t r2)
 
void cswap (size_t c1, size_t c2)
 Swap columns. More...
 

Protected Attributes

JMatrixND_t ws
 
double * __p
 pointer to data More...
 
size_t __n
 dimension of matrix More...
 
size_t __m
 capacity of matrix More...
 

Friends

JReaderoperator>> (JReader &in, JMatrixND &A)
 Read matrix from input. More...
 
JWriteroperator<< (JWriter &out, const JMatrixND &A)
 Write matrix to output. More...
 
std::ostream & operator<< (std::ostream &out, const JMatrixND &A)
 Print ASCII formatted output. More...
 

Detailed Description

NxN matrix.

Definition at line 348 of file JMatrixND.hh.

Constructor & Destructor Documentation

◆ JMatrixND() [1/4]

JMATH::JMatrixND::JMatrixND ( )
inline

Default constructor.

Definition at line 373 of file JMatrixND.hh.

374  {}

◆ JMatrixND() [2/4]

JMATH::JMatrixND::JMatrixND ( const size_t  size)
inline

Constructor.

The matrix is set to zero.

Parameters
sizedimension

Definition at line 384 of file JMatrixND.hh.

385  {
386  resize(size);
387  reset();
388  }
size_t size() const
Get dimension of matrix.
Definition: JMatrixND.hh:202
void resize(const size_t size)
Resize matrix.
Definition: JMatrixND.hh:446
JMatrixND & reset()
Set matrix to the null matrix.
Definition: JMatrixND.hh:459

◆ JMatrixND() [3/4]

JMATH::JMatrixND::JMatrixND ( const JMatrixND A)
inline

Copy constructor.

Parameters
Amatrix

Definition at line 396 of file JMatrixND.hh.

397  {
398  set(A);
399  }
void set(const JMatrixND_t &A)
Set matrix.
Definition: JMatrixND.hh:155

◆ JMatrixND() [4/4]

JMATH::JMatrixND::JMatrixND ( JMatrixND &&  A)
inline

Move constructor.

Parameters
Amatrix

Definition at line 407 of file JMatrixND.hh.

408  {
409  swap(A);
410  }
void swap(JMatrixND_t &A)
Swap matrices.
Definition: JMatrixND.hh:168

Member Function Documentation

◆ getInstance()

JMatrixND_t& JMATH::JMatrixND::getInstance ( )
inlineprotected

Get work space.

Returns
work space

Definition at line 361 of file JMatrixND.hh.

362  {
363  return ws;
364  }
JMatrixND_t ws
Definition: JMatrixND.hh:354

◆ operator=() [1/2]

JMatrixND& JMATH::JMatrixND::operator= ( const JMatrixND A)
inline

Assignment operator.

Parameters
Amatrix

Definition at line 418 of file JMatrixND.hh.

419  {
420  this->set(A);
421 
422  return *this;
423  }

◆ operator=() [2/2]

JMatrixND& JMATH::JMatrixND::operator= ( JMatrixND &&  A)
inline

Move assignment operator.

Parameters
Amatrix

Definition at line 431 of file JMatrixND.hh.

432  {
433  this->swap(A);
434 
435  return *this;
436  }

◆ resize()

void JMATH::JMatrixND::resize ( const size_t  size)
inline

Resize matrix.

Note that this method does not maintain data in the matrix.

Parameters
sizedimension

Definition at line 446 of file JMatrixND.hh.

447  {
448  static_cast<JMatrixND_t&>(*this).resize(size);
449 
451  }
Basic NxN matrix.
Definition: JMatrixND.hh:36
void resize(const size_t size)
Resize matrix.
Definition: JMatrixND.hh:102
JMatrixND_t & getInstance()
Get work space.
Definition: JMatrixND.hh:361

◆ reset()

JMatrixND& JMATH::JMatrixND::reset ( )
inline

Set matrix to the null matrix.

Returns
this matrix

Definition at line 459 of file JMatrixND.hh.

460  {
462 
463  JMatrixND_t& A = getInstance();
464 
465  A.resize(this->size());
466 
467  return *this;
468  }
JMatrixND_t & reset()
Set matrix to the null matrix.
Definition: JMatrixND.hh:130

◆ setIdentity()

JMatrixND& JMATH::JMatrixND::setIdentity ( )
inline

Set to identity matrix.

Returns
this matrix

Definition at line 476 of file JMatrixND.hh.

477  {
478  reset();
479 
480  for (size_t i = 0; i != this->size(); ++i) {
481  (*this)(i,i) = 1.0;
482  }
483 
484  return *this;
485  }

◆ negate()

JMatrixND& JMATH::JMatrixND::negate ( )
inline

Negate matrix.

Returns
this matrix

Definition at line 493 of file JMatrixND.hh.

494  {
495  double* p = this->data();
496 
497  for (size_t i = this->size()*this->size(); i != 0; --i, ++p) {
498  *p = -*p;
499  }
500 
501  return *this;
502  }
const double * data() const
Get pointer to data.
Definition: JMatrixND.hh:235

◆ add()

JMatrixND& JMATH::JMatrixND::add ( const JMatrixND A)
inline

Matrix addition.

Parameters
Amatrix
Returns
this matrix

Definition at line 511 of file JMatrixND.hh.

512  {
513  if (this->size() == A.size()) {
514 
515  double* p = this->data();
516  const double* q = A.data();
517 
518  for (size_t i = this->size()*this->size(); i != 0; --i, ++p, ++q) {
519  *p += *q;
520  }
521 
522  } else {
523  THROW(JException, "JMatrixND::add() inconsistent matrix dimensions " << this->size() << ' ' << A.size());
524  }
525 
526  return *this;
527  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712

◆ sub()

JMatrixND& JMATH::JMatrixND::sub ( const JMatrixND A)
inline

Matrix subtraction.

Parameters
Amatrix
Returns
this matrix

Definition at line 536 of file JMatrixND.hh.

537  {
538  if (this->size() == A.size()) {
539 
540  double* p = this->data();
541  const double* q = A.data();
542 
543  for (size_t i = this->size()*this->size(); i != 0; --i, ++p, ++q) {
544  *p -= *q;
545  }
546 
547  } else {
548  THROW(JException, "JMatrixND::sub() inconsistent matrix dimensions " << this->size() << ' ' << A.size());
549  }
550 
551  return *this;
552  }

◆ mul() [1/3]

JMatrixND& JMATH::JMatrixND::mul ( const double  factor)
inline

Scale matrix.

Parameters
factorfactor
Returns
this matrix

Definition at line 561 of file JMatrixND.hh.

562  {
563  double* p = this->data();
564 
565  for (size_t i = this->size()*this->size(); i != 0; --i, ++p) {
566  *p *= factor;
567  }
568 
569  return *this;
570  }

◆ div()

JMatrixND& JMATH::JMatrixND::div ( const double  factor)
inline

Scale matrix.

Parameters
factorfactor
Returns
this matrix

Definition at line 579 of file JMatrixND.hh.

580  {
581  double* p = this->data();
582 
583  for (size_t i = this->size()*this->size(); i != 0; --i, ++p) {
584  *p /= factor;
585  }
586 
587  return *this;
588  }

◆ mul() [2/3]

JMatrixND& JMATH::JMatrixND::mul ( const JMatrixND A,
const JMatrixND B 
)
inline

Matrix multiplication.

Parameters
Amatrix
Bmatrix
Returns
this matrix

Definition at line 598 of file JMatrixND.hh.

600  {
601  if (A.size() == B.size()) {
602 
603  this->resize(A.size());
604 
605  if (!this->empty()) {
606 
608 
609  C.set(B);
610  C.transpose();
611 
612  size_t i, row;
613 
614  for (row = 0; row + 4 <= this->size(); row += 4) { // process rows by four
615 
616  double* p0 = (*this)[row + 0];
617  double* p1 = (*this)[row + 1];
618  double* p2 = (*this)[row + 2];
619  double* p3 = (*this)[row + 3];
620 
621  for (size_t col = 0; col != this->size(); ++col, ++p0, ++p1, ++p2, ++p3) {
622 
623  double w0 = 0.0;
624  double w1 = 0.0;
625  double w2 = 0.0;
626  double w3 = 0.0;
627 
628  const double* a0 = A[row + 0];
629  const double* a1 = A[row + 1];
630  const double* a2 = A[row + 2];
631  const double* a3 = A[row + 3];
632 
633  const double* c0 = C[col];
634 
635  for (i = 0; i + 4 <= this->size(); i += 4, a0 += 4, a1 += 4, a2 += 4, a3 += 4, c0 += 4) {
636  w0 += a0[0] * c0[0] + a0[1] * c0[1] + a0[2] * c0[2] + a0[3] * c0[3];
637  w1 += a1[0] * c0[0] + a1[1] * c0[1] + a1[2] * c0[2] + a1[3] * c0[3];
638  w2 += a2[0] * c0[0] + a2[1] * c0[1] + a2[2] * c0[2] + a2[3] * c0[3];
639  w3 += a3[0] * c0[0] + a3[1] * c0[1] + a3[2] * c0[2] + a3[3] * c0[3];
640  }
641 
642  for ( ; i != this->size(); ++i, ++a0, ++a1, ++a2, ++a3, ++c0) {
643  w0 += (*a0) * (*c0);
644  w1 += (*a1) * (*c0);
645  w2 += (*a2) * (*c0);
646  w3 += (*a3) * (*c0);
647  }
648 
649  *p0 = w0;
650  *p1 = w1;
651  *p2 = w2;
652  *p3 = w3;
653  }
654  }
655 
656  for ( ; row != this->size(); ++row) { // remaining rows
657 
658  double* p0 = (*this)[row + 0];
659 
660  for (size_t col = 0; col != this->size(); ++col, ++p0) {
661 
662  double w0 = 0.0;
663 
664  const double* a0 = A[row + 0];
665  const double* c0 = C[col];
666 
667  for (i = 0; i + 4 <= this->size(); i += 4, a0 += 4, c0 += 4) {
668  w0 += a0[0] * c0[0] + a0[1] * c0[1] + a0[2] * c0[2] + a0[3] * c0[3];
669  }
670 
671  for ( ; i != this->size(); ++i, ++a0, ++c0) {
672  w0 += (*a0) * (*c0);
673  }
674 
675  *p0 = w0;
676  }
677  }
678  }
679 
680  } else {
681  THROW(JException, "JMatrixND::mul() inconsistent matrix dimensions " << A.size() << ' ' << B.size());
682  }
683 
684  return *this;
685  }
TPaveText * p1
static const double C
Physics constants.
bool empty() const
Check emptyness.
Definition: JMatrixND.hh:224

◆ equals()

bool JMATH::JMatrixND::equals ( const JMatrixND A,
const double  eps = std::numeric_limits<double>::min() 
) const
inline

Equality.

Parameters
Amatrix
epsnumerical precision
Returns
true if matrices identical; else false

Definition at line 695 of file JMatrixND.hh.

697  {
698  if (this->size() == A.size()) {
699 
700  for (size_t row = 0; row != this->size(); ++row) {
701 
702  const double* p = (*this)[row];
703  const double* q = A [row];
704 
705  for (size_t i = this->size(); i != 0; --i, ++p, ++q) {
706  if (fabs(*p - *q) > eps) {
707  return false;
708  }
709  }
710  }
711 
712  return true;
713 
714  } else {
715  THROW(JException, "JMatrixND::equals() inconsistent matrix dimensions " << this->size() << ' ' << A.size());
716  }
717  }

◆ isIdentity()

bool JMATH::JMatrixND::isIdentity ( const double  eps = std::numeric_limits<double>::min()) const
inline

Test identity.

Parameters
epsnumerical precision
Returns
true if identity matrix; else false

Definition at line 726 of file JMatrixND.hh.

727  {
728  for (size_t i = 0; i != this->size(); ++i) {
729 
730  if (fabs(1.0 - (*this)(i,i)) > eps) {
731  return false;
732  };
733 
734  for (size_t j = 0; j != i; ++j) {
735  if (fabs((*this)(i,j)) > eps || fabs((*this)(j,i)) > eps) {
736  return false;
737  };
738  }
739  }
740 
741  return true;
742  }
int j
Definition: JPolint.hh:792

◆ isSymmetric()

bool JMATH::JMatrixND::isSymmetric ( const double  eps = std::numeric_limits<double>::min()) const
inline

Test symmetry.

Parameters
epsnumerical precision
Returns
true if symmetric matrix; else false

Definition at line 751 of file JMatrixND.hh.

752  {
753  for (size_t i = 0; i != this->size(); ++i) {
754  for (size_t j = 0; j != i; ++j) {
755  if (fabs((*this)(i,j) - (*this)(j,i)) > eps) {
756  return false;
757  };
758  }
759  }
760 
761  return true;
762  }

◆ getDot()

double JMATH::JMatrixND::getDot ( const JVectorND v) const
inline

Get dot product.

The dot product corresponds to

\[ v^{T} \times A \times v \]

.

Parameters
vvector
Returns
dot product

Definition at line 773 of file JMatrixND.hh.

774  {
775  double dot = 0.0;
776 
777  for (size_t i = 0; i != v.size(); ++i) {
778 
779  const double* p = (*this)[i];
780 
781  double w = 0.0;
782 
783  for (JVectorND::const_iterator y = v.begin(); y != v.end(); ++y, ++p) {
784  w += (*p) * (*y);
785  }
786 
787  dot += v[i] * w;
788  }
789 
790  return dot;
791  }
data_type w[N+1][M+1]
Definition: JPolint.hh:867
data_type v[N+1][M+1]
Definition: JPolint.hh:866

◆ rswap()

void JMATH::JMatrixND::rswap ( size_t  r1,
size_t  r2 
)
inlineprotected

Definition at line 873 of file JMatrixND.hh.

874  {
875  JMatrixND_t& A = getInstance();
876 
877  A.resize(this->size());
878 
879  memcpy(A.data(), (*this)[r1], this->size() * sizeof(double));
880  memcpy((*this)[r1], (*this)[r2], this->size() * sizeof(double));
881  memcpy((*this)[r2], A.data(), this->size() * sizeof(double));
882  }

◆ cswap()

void JMATH::JMatrixND::cswap ( size_t  c1,
size_t  c2 
)
inlineprotected

Swap columns.

Parameters
c1column
c2column

Definition at line 891 of file JMatrixND.hh.

892  {
893  using std::swap;
894 
895  double* p1 = this->data() + c1;
896  double* p2 = this->data() + c2;
897 
898  for (size_t i = this->size(); i != 0; --i, p1 += this->size(), p2 += this->size()) {
899  swap(*p1, *p2);
900  }
901  }
TCanvas * c1
Global variables to handle mouse events.

◆ clear()

void JMATH::JMatrixND_t::clear ( )
inlineinherited

Clear memory.

Definition at line 83 of file JMatrixND.hh.

84  {
85  if (__p != NULL) {
86  delete [] __p;
87  }
88 
89  __p = NULL;
90  __n = 0;
91  __m = 0;
92  }
double * __p
pointer to data
Definition: JMatrixND.hh:339
size_t __m
capacity of matrix
Definition: JMatrixND.hh:341
size_t __n
dimension of matrix
Definition: JMatrixND.hh:340

◆ set()

void JMATH::JMatrixND_t::set ( const JMatrixND_t A)
inlineinherited

Set matrix.

Parameters
Amatrix

Definition at line 155 of file JMatrixND.hh.

156  {
157  this->resize(A.size());
158 
159  memcpy(this->data(), A.data(), A.size() * A.size() * sizeof(double));
160  }

◆ swap()

void JMATH::JMatrixND_t::swap ( JMatrixND_t A)
inlineinherited

Swap matrices.

Parameters
Amatrix

Definition at line 168 of file JMatrixND.hh.

169  {
170  using std::swap;
171 
172  swap(this->__p, A.__p);
173  swap(this->__n, A.__n);
174  swap(this->__m, A.__m);
175  }

◆ transpose()

JMatrixND_t& JMATH::JMatrixND_t::transpose ( )
inlineinherited

Transpose.

Returns
this matrix

Definition at line 183 of file JMatrixND.hh.

184  {
185  using std::swap;
186 
187  for (size_t row = 0; row != this->size(); ++row) {
188  for (size_t col = 0; col != row; ++col) {
189  swap((*this)(row,col), (*this)(col,row));
190  }
191  }
192 
193  return *this;
194  }

◆ size()

size_t JMATH::JMatrixND_t::size ( ) const
inlineinherited

Get dimension of matrix.

Returns
dimension

Definition at line 202 of file JMatrixND.hh.

203  {
204  return __n;
205  }

◆ capacity()

size_t JMATH::JMatrixND_t::capacity ( ) const
inlineinherited

Get capacity of dimension.

Returns
capacity

Definition at line 213 of file JMatrixND.hh.

214  {
215  return __m;
216  }

◆ empty()

bool JMATH::JMatrixND_t::empty ( ) const
inlineinherited

Check emptyness.

Returns
true if empty; else false

Definition at line 224 of file JMatrixND.hh.

225  {
226  return __n == 0;
227  }

◆ data() [1/2]

const double* JMATH::JMatrixND_t::data ( ) const
inlineinherited

Get pointer to data.

Returns
pointer to data.

Definition at line 235 of file JMatrixND.hh.

236  {
237  return __p;
238  }

◆ data() [2/2]

double* JMATH::JMatrixND_t::data ( )
inlineinherited

Get pointer to data.

Returns
pointer to data.

Definition at line 246 of file JMatrixND.hh.

247  {
248  return __p;
249  }

◆ operator[]() [1/2]

const double* JMATH::JMatrixND_t::operator[] ( size_t  row) const
inlineinherited

Get row data.

Parameters
rowrow number
Returns
pointer to row data

Definition at line 258 of file JMatrixND.hh.

259  {
260  return __p + row*__n;
261  }

◆ operator[]() [2/2]

double* JMATH::JMatrixND_t::operator[] ( size_t  row)
inlineinherited

Get row data.

Parameters
rowrow number
Returns
pointer to row data

Definition at line 270 of file JMatrixND.hh.

271  {
272  return __p + row*__n;
273  }

◆ operator()() [1/2]

double JMATH::JMatrixND_t::operator() ( const size_t  row,
const size_t  col 
) const
inlineinherited

Get matrix element.

Parameters
rowrow number
colcolumn number
Returns
matrix element at (row,col)

Definition at line 283 of file JMatrixND.hh.

284  {
285  return *(__p + row*__n + col);
286  }

◆ operator()() [2/2]

double& JMATH::JMatrixND_t::operator() ( const size_t  row,
const size_t  col 
)
inlineinherited

Get matrix element.

Parameters
rowrow number
colcolumn number
Returns
matrix element at (row,col)

Definition at line 296 of file JMatrixND.hh.

297  {
298  return *(__p + row*__n + col);
299  }

◆ at() [1/2]

double JMATH::JMatrixND_t::at ( size_t  row,
size_t  col 
) const
inlineinherited

Get matrix element.

Parameters
rowrow number
colcolumn number
Returns
matrix element at (row,col)

Definition at line 309 of file JMatrixND.hh.

310  {
311  if (row >= this->size() ||
312  col >= this->size()) {
313  THROW(JIndexOutOfRange, "JMatrixND::at(" << row << "," << col << "): index out of range.");
314  }
315 
316  return (*this)(row, col);
317  }

◆ at() [2/2]

double& JMATH::JMatrixND_t::at ( size_t  row,
size_t  col 
)
inlineinherited

Get matrix element.

Parameters
rowrow number
colcolumn number
Returns
matrix element at (row,col)

Definition at line 327 of file JMatrixND.hh.

328  {
329  if (row >= this->size() ||
330  col >= this->size()) {
331  THROW(JIndexOutOfRange, "JMatrixND::at(" << row << "," << col << "): index out of range.");
332  }
333 
334  return (*this)(row, col);
335  }

◆ mul() [3/3]

JMatrixND & JMATH::JMath< JMatrixND , JSecond_t >::mul ( const JSecond_t &  object)
inlineinherited

Multiply with object.

Parameters
objectobject
Returns
result object

Definition at line 354 of file JMath.hh.

355  {
356  return static_cast<JFirst_t&>(*this) = JFirst_t().mul(static_cast<const JFirst_t&>(*this), object);
357  }

Friends And Related Function Documentation

◆ operator>>

JReader& operator>> ( JReader in,
JMatrixND A 
)
friend

Read matrix from input.

Parameters
inreader
Amatrix
Returns
reader

Definition at line 801 of file JMatrixND.hh.

802  {
803  size_t size;
804 
805  in >> size;
806 
807  A.resize(size);
808 
809  size_t n = A.size() * A.size();
810 
811  for (double* p = A.data(); n != 0; --n, ++p) {
812  in >> *p;
813  }
814 
815  return in;
816  }
const int n
Definition: JPolint.hh:786

◆ operator<< [1/2]

JWriter& operator<< ( JWriter out,
const JMatrixND A 
)
friend

Write matrix to output.

Parameters
outwriter
Amatrix
Returns
writer

Definition at line 826 of file JMatrixND.hh.

827  {
828  out << A.size();
829 
830  size_t n = A.size() * A.size();
831 
832  for (const double* p = A.data(); n != 0; --n, ++p) {
833  out << *p;
834  }
835 
836  return out;
837  }

◆ operator<< [2/2]

std::ostream& operator<< ( std::ostream &  out,
const JMatrixND A 
)
friend

Print ASCII formatted output.

Parameters
outoutput stream
Amatrix
Returns
output stream

Definition at line 847 of file JMatrixND.hh.

848  {
849  using namespace std;
850 
851  const JFormat format(out, getFormat<JMatrixND>(JFormat_t(10, 3, std::ios::fixed | std::ios::showpos)));
852 
853  for (size_t row = 0; row != A.size(); ++row) {
854 
855  for (size_t col = 0; col != A.size(); ++col) {
856  out << format << A(row,col) << ' ';
857  }
858 
859  out << endl;
860  }
861 
862  return out;
863  }
Definition: JSTDTypes.hh:14
Data structure for format specifications.
Definition: JManip.hh:524
Auxiliary class to temporarily define format specifications.
Definition: JManip.hh:636

Member Data Documentation

◆ ws

JMatrixND_t JMATH::JMatrixND::ws
protected

Definition at line 354 of file JMatrixND.hh.

◆ __p

double* JMATH::JMatrixND_t::__p
protectedinherited

pointer to data

Definition at line 339 of file JMatrixND.hh.

◆ __n

size_t JMATH::JMatrixND_t::__n
protectedinherited

dimension of matrix

Definition at line 340 of file JMatrixND.hh.

◆ __m

size_t JMATH::JMatrixND_t::__m
protectedinherited

capacity of matrix

Definition at line 341 of file JMatrixND.hh.


The documentation for this struct was generated from the following file: