|
|
Go to the documentation of this file.
47 std::stringstream errstr;
48 errstr << "Index out of range.";
49 throw Exception( "Matrix::Matrix()", errstr.str(), 700);
94 for( int k=0; k<sz; k++)
101 if( mRC!=rSrc. mRC) return false;
102 if( mCC!=rSrc. mCC) return false;
104 for( int k=0; k<sz; k++)
150 if( mCC==cc && mRC==rc) return;
175 for( int k=0; k<sz; k++) mpData[k]=0;
183 for( int i=0; i< mRC; i++) {
184 for( int j=0; j< mCC; j++) {
195 if(i<0 || i>= mRC || j<0 || j>= mCC) {
196 std::stringstream errstr;
197 errstr << "Index out of range.";
198 throw Exception( "Matrix::At", errstr.str(), 700);
205 if(i<0 || i>= mRC || j<0 || j>= mCC) {
206 std::stringstream errstr;
207 errstr << "Index out of range.";
208 throw Exception( "Matrix::At", errstr.str(), 700);
216 if(i<0 || i>= mRC || j<0 || j>= mCC) {
217 std::stringstream errstr;
218 errstr << "Index out of range.";
219 throw Exception( "Matrix::At", errstr.str(), 700);
226 if(i<0 || i>= mRC || j<0 || j>= mCC) {
227 std::stringstream errstr;
228 errstr << "Index out of range.";
229 throw Exception( "Matrix::At", errstr.str(), 700);
239 for( int k=0; k<sz; k++)
265 std::string label=rLabel;
266 if(rLabel== "") label= "Matrix";
275 for( unsigned int k=0; k< Size(); k++)
295 std::string label=rLabel;
296 if(rLabel== "") label= "Matrix";
305 std::stringstream errstr;
306 errstr << "Invalid dimension. " << rTr. FileLine();
307 throw Exception( "Matrix::DoRead", errstr.str(), 700);
312 while(!rTr. Eos(label) && k<( int) Size()) {
318 std::stringstream errstr;
319 errstr << "Dimension mismatch. " << rTr. FileLine();
320 throw Exception( "Matrix::DoRead", errstr.str(), 700);
355 std::stringstream errstr;
356 errstr << "Index out of range.";
357 throw Exception( "Vector::Vector()", errstr.str(), 700);
395 for( int k=0; k< mDim; k++)
403 for( int k=0; k< mDim; k++)
425 if( mDim==dim) return;
456 if(i<0 || i>= mDim) {
457 std::stringstream errstr;
458 errstr << "Index out of range.";
459 throw Exception( "Vector::At", errstr.str(), 700);
466 if(i<0 || i>= mDim) {
467 std::stringstream errstr;
468 errstr << "Index out of range.";
469 throw Exception( "Vector::At", errstr.str(), 700);
477 if(i<0 || i>= mDim) {
478 std::stringstream errstr;
479 errstr << "Index out of range.";
480 throw Exception( "Vector::At", errstr.str(), 700);
487 if(i<0 || i>= mDim) {
488 std::stringstream errstr;
489 errstr << "Index out of range.";
490 throw Exception( "Vector::At", errstr.str(), 700);
499 for( int k=0; k<dim; k++)
515 std::string label=rLabel;
516 if(rLabel== "") label= "Vector";
524 for( int k=0; k< mDim; k++)
543 std::string label=rLabel;
544 if(rLabel== "") label= "Vector";
552 std::stringstream errstr;
553 errstr << "Invalid dimension. " << rTr. FileLine();
554 throw Exception( "Vector::DoRead", errstr.str(), 700);
559 while(!rTr. Eos(label) && k<( int) Size()) {
565 std::stringstream errstr;
566 errstr << "Dimension mismatch. " << rTr. FileLine();
567 throw Exception( "Vector::DoRead", errstr.str(), 700);
606 std::stringstream errstr;
607 errstr << "Index out of range.";
608 throw Exception( "Polyhedron::Polyhedron()", errstr.str(), 700);
654 if( mA!=rSrc. mA) return false;
655 if( mB!=rSrc. mB) return false;
675 std::stringstream errstr;
676 errstr << "Invalid dimension";
677 throw Exception( "Polyhedron::Dimension", errstr.str(), 700);
705 std::stringstream errstr;
706 errstr << "Invalid dimansions.";
707 throw Exception( "Polyhedron::AB", errstr.str(), 700);
736 std::string label=rLabel;
737 std::string ftype= "Polyhedron";
738 if(rLabel== "") label=ftype;
766 std::string label=rLabel;
767 if(rLabel== "") label= "Polyhedron";
778 std::stringstream errstr;
779 errstr << "Dimension mismatch, rows. " << rTr. FileLine();
780 throw Exception( "Polyhedron::DoRead", errstr.str(), 700);
830 std::stringstream errstr;
831 errstr << "Dimension out of range.";
832 throw Exception( "LinearRelation::LinearRelation()", errstr.str(), 700);
890 if( mA1!=rSrc. mA1) return false;
891 if( mA2!=rSrc. mA2) return false;
892 if( mB!=rSrc. mB) return false;
893 if( mC!=rSrc. mC) return false;
894 if( mD!=rSrc. mD) return false;
914 std::stringstream errstr;
915 errstr << "Invalid dimension";
916 throw Exception( "LinearRelation::Dimension", errstr.str(), 700);
975 std::stringstream errstr;
976 errstr << "Invalid dimensions.";
977 throw Exception( "LinearRelation::Relation", errstr.str(), 700);
980 std::stringstream errstr;
981 errstr << "Invalid dimensions.";
982 throw Exception( "LinearRelation::Relation", errstr.str(), 700);
985 std::stringstream errstr;
986 errstr << "Invalid dimensions.";
987 throw Exception( "LinearRelation::Relation", errstr.str(), 700);
1002 std::stringstream errstr;
1003 errstr << "Invalid dimensions.";
1004 throw Exception( "LinearRelation::Map", errstr.str(), 700);
1007 std::stringstream errstr;
1008 errstr << "Invalid dimensions.";
1009 throw Exception( "LinearRelation::Map", errstr.str(), 700);
1023 for( int i =0; i<n; i++) {
1024 for( int j =0; j<n; j++) {
1026 mA1(i+n,j)= mC(i,j);
1056 for( int i =0; i<n; i++) {
1085 std::string label=rLabel;
1086 if(rLabel== "") label= "LinearRelation";
1124 std::string label=rLabel;
1125 if(rLabel== "") label= "LinearRelation";
1136 if(token. IsEnd(label)){
1140 if(token. IsBegin( "CMatrix")) {
1143 c. Read(rTr, "CMatrix");
1144 d. Read(rTr, "DVector");
1148 if(token. IsBegin( "A1Matrix")) {
1151 a1. Read(rTr, "A1Matrix");
1152 a2. Read(rTr, "A2Matrix");
1153 b. Read(rTr, "BVector");
#define FAUDES_TYPE_IMPLEMENTATION(ftype, ctype, cbase)
virtual void DoSWrite(TokenWriter &tw) const
const Vector & B(void) const
const Matrix & C(void) const
virtual LinearRelation & DoCopy(const LinearRelation &rSrc)
virtual void DoRead(TokenReader &tr, const std::string &rLabel="", const Type *pContext=0)
virtual bool DoEqual(const LinearRelation &rOther) const
const Vector & D(void) const
virtual void DoWrite(TokenWriter &tw, const std::string &rLabel="", const Type *pContext=0) const
virtual ~LinearRelation(void)
const Matrix & A2(void) const
bool Relation(void) const
bool Identity(void) const
Type * UserData(void) const
int Dimension(void) const
const Matrix & A1(void) const
void Identity(int dim=-1)
const Scalar::Type & operator()(int i, int j) const
int ColumnCount(void) const
virtual void DoSWrite(TokenWriter &tw) const
virtual void DoRead(TokenReader &tr, const std::string &rLabel="", const Type *pContext=0)
virtual void DoWrite(TokenWriter &tw, const std::string &rLabel="", const Type *pContext=0) const
const Scalar::Type & At(int i, int j) const
virtual Matrix & DoCopy(const Matrix &rSrc)
void Zero(int rc=-1, int cc=-1)
virtual bool DoEqual(const Matrix &rOther) const
const Scalar::Type * CArray(void) const
void Dimension(int rc, int cc)
virtual void DoWrite(TokenWriter &tw, const std::string &rLabel="", const Type *pContext=0) const
virtual void DoRead(TokenReader &tr, const std::string &rLabel="", const Type *pContext=0)
virtual Polyhedron & DoCopy(const Polyhedron &rSrc)
virtual const std::string & Name(void) const
virtual void DoSWrite(TokenWriter &tw) const
const Matrix & A(void) const
void AB(const Matrix &rA, const Vector &rB)
int Dimension(void) const
const Vector & B(void) const
virtual ~Polyhedron(void)
virtual bool DoEqual(const Polyhedron &rOther) const
Type * UserData(void) const
std::string FileLine(void) const
bool Eos(const std::string &rLabel)
void ReadEnd(const std::string &rLabel)
void ReadBegin(const std::string &rLabel)
void WriteFloat(const double &val)
void WriteComment(const std::string &rComment)
void Write(Token &rToken)
void WriteEnd(const std::string &rLabel)
Int AttributeIntegerValue(const std::string &name)
bool ExistsAttributeString(const std::string &name)
void InsAttribute(const std::string &name, const std::string &value)
void SetBegin(const std::string &rName)
bool ExistsAttributeInteger(const std::string &name)
void InsAttributeInteger(const std::string &name, Int value)
const std::string & AttributeStringValue(const std::string &name)
void Read(const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
void Write(const Type *pContext=0) const
virtual Vector & DoCopy(const Vector &rSrc)
const Scalar::Type & operator()(int i) const
const Scalar::Type * CArray(void) const
const Scalar::Type & At(int i) const
virtual void DoSWrite(TokenWriter &tw) const
virtual bool DoEqual(const Vector &rOther) const
int Dimension(void) const
virtual void DoRead(TokenReader &tr, const std::string &rLabel="", const Type *pContext=0)
virtual void DoWrite(TokenWriter &tw, const std::string &rLabel="", const Type *pContext=0) const
std::string ToStringInteger(Int number)
libFAUDES 2.34d
--- 2026.03.11
--- c++ api documentaion by doxygen
|