Ticket #861: qoca-gcc4.diff
File qoca-gcc4.diff, 97.7 KB (added by , 18 years ago) |
---|
-
qoca/QcLinInEqTableau.hh
174 174 //-----------------------------------------------------------------------// 175 175 // Utility functions. // 176 176 //-----------------------------------------------------------------------// 177 virtual void Print( ostream &os) const177 virtual void Print(std::ostream &os) const 178 178 { QcLinEqTableau::Print(os); } 179 179 180 180 protected: … … 235 235 #ifndef NDEBUG 236 236 if (!QcUtility::IsZero (rhs)) 237 237 { 238 cerr << "DBG: N.B.: found near-zero non-zero RHS.\n";238 std::cerr << "DBG: N.B.: found near-zero non-zero RHS.\n"; 239 239 //*(char *)0=0; 240 240 //return rhs; 241 241 } -
qoca/QcSparseCoeff.hh
27 27 #ifndef __QcSparseCoeffH 28 28 #define __QcSparseCoeffH 29 29 30 #include <iostream .h>30 #include <iostream> 31 31 32 32 class QcSparseCoeff 33 33 { … … 62 62 //-----------------------------------------------------------------------// 63 63 // Utility function // 64 64 //-----------------------------------------------------------------------// 65 void Print( ostream &os) const65 void Print(std::ostream &os) const 66 66 { os << "[" << fIndex << "," << fValue << "]"; } 67 67 68 68 -
qoca/QcLinInEqRowColStateVector.H
1 1 // Generated automatically from QcLinInEqRowColStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx. 2 2 #ifndef QcLinInEqRowColStateVectorDCL 3 3 #define QcLinInEqRowColStateVectorDCL 4 #line 1 "QcLinInEqRowColStateVector.ch"5 4 // $Id: QcLinInEqRowColStateVector.ch,v 1.1 2000/11/29 04:31:16 pmoulder Exp $ 6 5 7 6 //============================================================================// … … 53 52 54 53 virtual void 55 54 SwapColumns(unsigned v1, unsigned v2); 56 #line 142 "QcLinInEqRowColStateVector.ch"57 55 public: 58 56 QcLinInEqColStateVector *fColState; 59 57 -
qoca/QcDelCoreTableau.cc
30 30 #include "qoca/QcDelCoreTableau.hh" 31 31 #include "qoca/QcRowAdaptor.hh" 32 32 33 using namespace std; 34 33 35 unsigned QcDelCoreTableau::AddRow(QcRowAdaptor &varCoeffs, numT rhs) 34 36 { 35 37 unsigned r = 0; // Row of fA, col of fM, int for original constraint -
qoca/QcStateVector.hh
27 27 #ifndef __QcStateVectorH 28 28 #define __QcStateVectorH 29 29 30 #include <iostream .h>30 #include <iostream> 31 31 #include "qoca/QcDefines.hh" 32 32 #include "qoca/QcState.hh" 33 33 … … 82 82 virtual void AddToList(QcState **start, QcState **finish) = 0; 83 83 virtual void RemoveFromList(QcState **start, QcState **finish) = 0; 84 84 85 virtual void Print( ostream &os) const;85 virtual void Print(std::ostream &os) const; 86 86 87 87 protected: 88 88 QcState * const * const getAllocEnd() const … … 111 111 delete [] fStates; 112 112 } 113 113 114 inline void QcStateVector::Print( ostream &os) const114 inline void QcStateVector::Print(std::ostream &os) const 115 115 { 116 116 for (unsigned i = 0; i < fSize; i++) { 117 117 fStates[i]->Print(os); 118 os << endl;118 os << std::endl; 119 119 } 120 120 } 121 121 -
qoca/QcLinInEqRowColStateVector.hh
2 2 #include "QcLinInEqRowColStateVector.H" 3 3 #ifndef QcLinInEqRowColStateVectorIFN 4 4 #define QcLinInEqRowColStateVectorIFN 5 #line 1 "QcLinInEqRowColStateVector.ch"6 5 // $Id: QcLinInEqRowColStateVector.ch,v 1.1 2000/11/29 04:31:16 pmoulder Exp $ 7 6 8 7 //============================================================================// … … 38 37 39 38 40 39 41 #line 46 "QcLinInEqRowColStateVector.ch"42 40 //-----------------------------------------------------------------------// 43 41 // Manipulation functions. // 44 42 //-----------------------------------------------------------------------// 45 43 46 #line 147 "QcLinInEqRowColStateVector.ch"47 44 /* 48 45 Local Variables: 49 46 mode:c++ -
qoca/QcUnsortedListSet.hh
1 1 #ifndef __QcUnsortedListSetH 2 2 #define __QcUnsortedListSetH 3 3 4 #include <vector .h>4 #include <vector> 5 5 6 6 #if __GNUC__ >= 4 7 7 template <class T, class Alloc = std::allocator<T> > … … 12 12 { 13 13 public: 14 14 typedef T value_type; 15 typedef value_type*iterator;16 typedef value_type const *const_iterator;15 typedef typename std::vector<T>::iterator iterator; 16 typedef typename std::vector<T>::const_iterator const_iterator; 17 17 typedef value_type& reference; 18 18 typedef const value_type& const_reference; 19 19 typedef size_t size_type; … … 34 34 { 35 35 } 36 36 37 iterator begin() { return elements.begin(); } 38 iterator end() { return elements.end(); } 37 // TODO: This really shouldn't rely on vector's iterator type being a pointer 38 iterator begin() { return (iterator)elements.begin(); } 39 iterator end() { return (iterator)elements.end(); } 39 40 40 iterator abegin() { return elements.begin(); }41 iterator aend() { return elements.end(); }41 iterator abegin() { return (iterator)elements.begin(); } 42 iterator aend() { return (iterator)elements.end(); } 42 43 43 44 const_iterator abegin() const { return elements.begin(); } 44 45 const_iterator aend() const { return elements.end(); } … … 83 84 84 85 (The reason for using an instance variable is so that we can control 85 86 the interface.) */ 86 vector<T> elements;87 std::vector<T> elements; 87 88 }; 88 89 #endif /* !__QcUnsortedListSetH */ -
qoca/QcCoreTableau.cc
28 28 #include "qoca/QcCoreTableau.hh" 29 29 #include "qoca/QcRowAdaptor.hh" 30 30 31 using namespace std; 32 31 33 unsigned QcCoreTableau::AddRow(QcRowAdaptor &varCoeffs, numT rhs) 32 34 { 33 35 unsigned r = 0; // Row of fA, col of fM, int for original constraint -
qoca/QcOrigRowStateVector.hh
2 2 #include "QcOrigRowStateVector.H" 3 3 #ifndef QcOrigRowStateVectorIFN 4 4 #define QcOrigRowStateVectorIFN 5 #line 1 "QcOrigRowStateVector.ch"6 5 // $Id: QcOrigRowStateVector.ch,v 1.2 2000/12/06 05:32:56 pmoulder Exp $ 7 6 // Originally written by Alan Finlay and Sitt Sen Chok 8 7 … … 101 100 // Manipulation functions. // 102 101 //-----------------------------------------------------------------------// 103 102 104 #line 152 "QcOrigRowStateVector.ch"105 103 #ifndef NDEBUG 106 104 107 #line 165 "QcOrigRowStateVector.ch"108 105 #endif 109 106 110 107 111 108 112 109 113 110 inline void 114 QcOrigRowStateVector::Print( ostream &os) const111 QcOrigRowStateVector::Print(std::ostream &os) const 115 112 { 116 os << endl << "Original Row State Vector:";113 os << std::endl << "Original Row State Vector:"; 117 114 QcStateVector::Print( os); 118 115 } 119 116 -
qoca/QcLinEqColStateVector.cc
1 1 // Generated automatically from QcLinEqColStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx. 2 2 #include "QcLinEqColStateVector.hh" 3 #line 1 "QcLinEqColStateVector.ch"4 3 // $Id: QcLinEqColStateVector.ch,v 1.2 2000/12/06 05:32:56 pmoulder Exp $ 5 4 6 5 //============================================================================// … … 36 35 37 36 38 37 39 #line 49 "QcLinEqColStateVector.ch"40 38 #ifndef NDEBUG 41 39 42 40 … … 117 115 //-----------------------------------------------------------------------// 118 116 119 117 120 #line 151 "QcLinEqColStateVector.ch"121 118 //-----------------------------------------------------------------------// 122 119 // Set functions. // 123 120 //-----------------------------------------------------------------------// 124 #line 172 "QcLinEqColStateVector.ch"125 121 void 126 122 QcLinEqColStateVector::SetBasic(unsigned i, bool b) 127 123 { … … 137 133 } 138 134 } 139 135 140 #line 195 "QcLinEqColStateVector.ch"141 136 //-----------------------------------------------------------------------// 142 137 // Manipulation functions. // 143 138 //-----------------------------------------------------------------------// … … 166 161 } 167 162 168 163 169 #line 254 "QcLinEqColStateVector.ch"170 164 void 171 165 QcLinEqColStateVector::Alloc(QcState **start, QcState **finish) 172 166 { … … 227 221 228 222 229 223 void 230 QcLinEqColStateVector::Print( ostream &os) const224 QcLinEqColStateVector::Print(std::ostream &os) const 231 225 { 232 226 QcQuasiColStateVector::Print(os); 233 os << endl << "Basic variable list:" <<endl;227 os << std::endl << "Basic variable list:" << std::endl; 234 228 QcLinEqColState *curr = fBasicHead.fNextCol; 235 229 236 230 while (curr != &fBasicHead) 237 231 { 238 232 curr->Print(os); 239 os << endl;233 os << std::endl; 240 234 curr = curr->fNextCol; 241 235 } 242 236 243 os << endl << "Param variable list:" <<endl;237 os << std::endl << "Param variable list:" << std::endl; 244 238 curr = fParamHead.fNextCol; 245 239 246 240 while (curr != &fBasicHead) 247 241 { 248 242 curr->Print(os); 249 os << endl;243 os << std::endl; 250 244 curr = curr->fNextCol; 251 245 } 252 246 } 253 247 254 248 255 249 256 #line 358 "QcLinEqColStateVector.ch"257 250 /* 258 251 Local Variables: 259 252 mode:c++ -
qoca/QcIneqSolverBase.hh
2 2 #include "QcIneqSolverBase.H" 3 3 #ifndef QcIneqSolverBaseIFN 4 4 #define QcIneqSolverBaseIFN 5 #line 1 "QcIneqSolverBase.ch"6 5 7 6 #include <qoca/QcSolver.hh> 8 7 … … 12 11 13 12 14 13 15 inline14 /*inline 16 15 QcIneqSolverBase::QcIneqSolverBase() 17 16 : QcSolver(), 18 17 fSystem() 19 18 { 19 ; 20 20 } 21 21 22 22 … … 25 25 : QcSolver(), 26 26 fSystem( hintNumConstraints, hintNumVariables) 27 27 { 28 } 28 ; 29 }*/ 29 30 30 31 31 #line 80 "QcIneqSolverBase.ch"32 32 //-----------------------------------------------------------------------// 33 33 // Constraint management methods // 34 34 //-----------------------------------------------------------------------// 35 35 36 36 37 #line 173 "QcIneqSolverBase.ch"38 37 /* 39 38 Local Variables: 40 39 mode:c++ -
qoca/QcBiMapNotifier.hh
78 78 //-----------------------------------------------------------------------// 79 79 // Utility functions. // 80 80 //-----------------------------------------------------------------------// 81 virtual void Print( ostream &os) const;81 virtual void Print(std::ostream &os) const; 82 82 }; 83 83 84 84 #ifndef NDEBUG … … 94 94 fOCMap.EraseByIndex(ci); 95 95 } 96 96 97 inline void QcBiMapNotifier::Print( ostream &os) const97 inline void QcBiMapNotifier::Print(std::ostream &os) const 98 98 { 99 os << "Variables:" << endl;99 os << "Variables:" << std::endl; 100 100 fVMap.Print(os); 101 os << endl << "Constraints:" <<endl;101 os << std::endl << "Constraints:" << std::endl; 102 102 fOCMap.Print(os); 103 os << endl;103 os << std::endl; 104 104 } 105 105 106 106 inline void QcBiMapNotifier::Restart() … … 110 110 } 111 111 112 112 #ifndef qcNoStream 113 inline ostream& operator<<(ostream& os, const QcBiMapNotifier &n)113 inline std::ostream& operator<<(std::ostream& os, const QcBiMapNotifier &n) 114 114 { 115 115 n.Print(os); 116 116 return os; -
qoca/QcUtility.cc
1 #include <qoca/QcUtility.hh> 2 3 /* Needed for GCC4, avoids undefined references */ 4 5 double const QcUtility::qcEps; // = _QC_EPS; 6 double const QcUtility::qcNearEps; // = 9.313225746154785e-10; // 2 ** -30 7 double const QcUtility::qcVaguelyNearEps; // = 9.5367431640625e-7; // 2 ** -20 8 double const QcUtility::qcMaxZeroVal; // = _QC_EPS * (1 - DBL_EPSILON / 2); 9 -
qoca/QcCassConstraint.hh
44 44 //-----------------------------------------------------------------------// 45 45 // Utility functions // 46 46 //-----------------------------------------------------------------------// 47 virtual void Print( ostream &os) const;47 virtual void Print(std::ostream &os) const; 48 48 }; 49 49 50 50 inline QcCassConstraint::QcCassConstraint(QcFloat &v, QcConstraint &c, … … 53 53 { 54 54 } 55 55 56 inline void QcCassConstraint::Print( ostream &os) const56 inline void QcCassConstraint::Print(std::ostream &os) const 57 57 { 58 58 os << "CassConstraint(" 59 59 << fVariable << "," -
qoca/QcFloatRep.H
1 1 // Generated automatically from QcFloatRep.ch by /home/pmoulder/usr/local/bin/ch2xx. 2 2 #ifndef QcFloatRepDCL 3 3 #define QcFloatRepDCL 4 #line 1 "QcFloatRep.ch"5 4 // $Id: QcFloatRep.ch,v 1.13 2001/01/10 05:01:51 pmoulder Exp $ 6 5 7 6 //============================================================================// … … 55 54 56 55 QcFloatRep (const char *name, numT desval, numT sw, numT ew, 57 56 bool restricted); 58 #line 74 "QcFloatRep.ch"59 57 #ifndef NDEBUG 60 58 bool isQcFloatRep() const 61 59 { return fMagic == qcFloatMagic1; } … … 149 147 150 148 151 149 inline char const *Name() const; 152 #line 176 "QcFloatRep.ch"153 150 virtual void SetWeight (numT w); 154 #line 183 "QcFloatRep.ch"155 151 virtual void SetValue (numT v); 156 #line 194 "QcFloatRep.ch"157 152 /** Set the goal value of this variable to <tt>dv</tt>. 158 153 159 154 <p>Note that many solvers ignore SuggestValue on variables that are not edit … … 161 156 **/ 162 157 void 163 158 SuggestValue (numT dv); 164 #line 206 "QcFloatRep.ch"165 159 /** Sets field <tt>fName</tt> to point to a heap-allocated string with a hidden 166 160 magic number field at the front. (The magic number is qcFloatMagic2 without 167 161 the '\0' terminator.) … … 170 164 of lack of pointers. The Java version consists of `fName = n'.) 171 165 **/ 172 166 void SetName (char const *n); 173 #line 248 "QcFloatRep.ch"174 167 inline void SetToGoal(); 175 #line 255 "QcFloatRep.ch"176 168 virtual void SetToEditWeight() = 0; 177 169 178 170 virtual void SetToStayWeight() = 0; … … 191 183 /** Called just before delete, to detect pointer corruption. */ 192 184 virtual void assertInvar() const; 193 185 194 #line 296 "QcFloatRep.ch"195 186 /** Deallocates old name string checking magic2. 196 187 Returns success indicator. 197 188 **/ 198 189 bool FreeName(); 199 #line 321 "QcFloatRep.ch"200 190 /** Set variables to defaults (including getting a new fId). */ 201 191 inline void Reset(); 202 #line 330 "QcFloatRep.ch"203 192 bool operator<(const QcFloatRep &other) const 204 193 // The comparisons are for when QcFloatRep is used 205 194 // as an identifier and compares instances not structure. … … 227 216 //-----------------------------------------------------------------------// 228 217 229 218 230 virtual void Print (ostream &os) const; 231 #line 372 "QcFloatRep.ch" 219 virtual void Print (std::ostream &os) const; 232 220 protected: 233 221 static TId fNextValidId; 234 222 static const TId fInvalidId = 0; -
qoca/QcCompPivotTableau.cc
30 30 #include "qoca/QcTableauColIterator.hh" 31 31 #include "qoca/QcDenseTableauColIterator.hh" 32 32 33 using namespace std; 34 33 35 int QcCompPivotTableau::AddArtificial(numT coeff) 34 36 { 35 37 int vi = IncreaseColumns(); -
qoca/QcDelLinInEqTableau.cc
29 29 #include "qoca/QcSparseMatrixRowIterator.hh" 30 30 #include "qoca/QcDenseMatrixColIterator.hh" 31 31 32 using namespace std; 33 32 34 int QcDelLinInEqTableau::AddGtEq(QcRowAdaptor &varCoeffs, numT rhs) 33 35 { 34 36 int r = AddEq(varCoeffs, rhs); -
qoca/QcQuasiRowState.hh
59 59 //-----------------------------------------------------------------------// 60 60 // Utililty functions. // 61 61 //-----------------------------------------------------------------------// 62 virtual void Print( ostream &os);62 virtual void Print(std::ostream &os); 63 63 64 64 public: 65 65 int fIndex; // The property vector index of this record. … … 83 83 fPrevRow = 0; 84 84 } 85 85 86 inline void QcQuasiRowState::Print( ostream &os)86 inline void QcQuasiRowState::Print(std::ostream &os) 87 87 { 88 88 os << "Index(" << fIndex << ")," 89 89 << "ARowIndex(" << fARowIndex << ")," -
qoca/QcConstraintRep.cc
27 27 #include "qoca/QcDefines.hh" 28 28 #include "qoca/QcConstraintRep.hh" 29 29 30 using namespace std; 31 30 32 QcConstraintRep::TId QcConstraintRep::fNextValidId = 1; 31 33 const QcConstraintRep::TId QcConstraintRep::fInvalidId = 0; 32 34 -
qoca/QcQuasiRowColStateVector.cc
1 1 // Generated automatically from QcQuasiRowColStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx. 2 2 #include "QcQuasiRowColStateVector.hh" 3 #line 1 "QcQuasiRowColStateVector.ch"4 3 // $Id: QcQuasiRowColStateVector.ch,v 1.4 2001/01/30 01:32:08 pmoulder Exp $ 5 4 6 5 //============================================================================// … … 39 38 //-----------------------------------------------------------------------// 40 39 // Constructor. // 41 40 //-----------------------------------------------------------------------// 42 #line 63 "QcQuasiRowColStateVector.ch"43 41 //-----------------------------------------------------------------------// 44 42 // Manipulation functions. // 45 43 //-----------------------------------------------------------------------// 46 #line 80 "QcQuasiRowColStateVector.ch"47 44 #if 0 /* unused */ 48 45 49 46 void … … 104 101 //-----------------------------------------------------------------------// 105 102 // Utility functions. // 106 103 //-----------------------------------------------------------------------// 107 #line 155 "QcQuasiRowColStateVector.ch"108 104 /* 109 105 Local Variables: 110 106 mode:c++ -
qoca/QcSparseMatrix.hh
27 27 #ifndef __QcSparseMatrixH 28 28 #define __QcSparseMatrixH 29 29 30 #include <vector .h>30 #include <vector> 31 31 #include "qoca/QcDefines.hh" 32 32 #include "qoca/QcMatrix.hh" 33 33 #include "qoca/QcSparseMatrixElement.hh" -
qoca/QcDesireValueStore.hh
56 56 //-----------------------------------------------------------------------// 57 57 // Utility functions. // 58 58 //-----------------------------------------------------------------------// 59 void Print( ostream &os) const;59 void Print(std::ostream &os) const; 60 60 61 61 private: 62 62 QcFloatRep *fVariablePtr; 63 63 numT fDesValue; 64 64 }; 65 65 66 inline void QcDesireValueStore::Print( ostream &os) const66 inline void QcDesireValueStore::Print(std::ostream &os) const 67 67 { 68 68 fVariablePtr->Print( os); 69 69 os << ":" << fDesValue; -
qoca/QcBiMap.hh
2 2 #include "QcBiMap.H" 3 3 #ifndef QcBiMapIFN 4 4 #define QcBiMapIFN 5 #line 1 "QcBiMap.ch"6 5 7 #line 21 "QcBiMap.ch"8 6 #define TMPL template<class AKey> 9 7 10 8 … … 12 10 13 11 14 12 15 #line 39 "QcBiMap.ch"16 13 #ifndef NDEBUG 17 14 TMPL 18 15 inline void … … 23 20 fIndexMap[ i].assertInvar(); 24 21 if(fIndexMap[ i].isDead()) 25 22 continue; 26 TIdentifierMap::const_iterator f = fIdentifierMap.find(fIndexMap[i]);23 typename TIdentifierMap::const_iterator f = fIdentifierMap.find(fIndexMap[i]); 27 24 qcAssertInvar( f != fIdentifierMap.end()); 28 25 qcAssertInvar( f->second == i); 29 26 } 30 27 31 for( TIdentifierMap::const_iterator ii = fIdentifierMap.begin(); ii != fIdentifierMap.end(); ii++)28 for(typename TIdentifierMap::const_iterator ii = fIdentifierMap.begin(); ii != fIdentifierMap.end(); ii++) 32 29 { 33 30 unsigned ix = ii->second; 34 31 qcAssertInvar( ix < fIndexMap.size()); … … 52 49 #endif 53 50 54 51 55 #line 86 "QcBiMap.ch"56 52 //-----------------------------------------------------------------------// 57 53 // BiMap manipulation functions. // 58 54 //-----------------------------------------------------------------------// 59 55 60 56 61 #line 93 "QcBiMap.ch"62 57 TMPL 63 58 inline void 64 59 QcBiMap<AKey>::EraseByIndex(int index) … … 84 79 85 80 86 81 87 #line 123 "QcBiMap.ch"88 82 TMPL 89 83 inline void 90 84 QcBiMap<AKey>::SwapByIndex(int i1, int i2) … … 99 93 fIndexMap[ i1] = ident2; 100 94 fIndexMap[ i2] = ident1; 101 95 102 QcBiMap<AKey>::TIdentifierMap::iterator it1 = fIdentifierMap.find( ident1);96 typename QcBiMap<AKey>::TIdentifierMap::iterator it1 = fIdentifierMap.find( ident1); 103 97 qcAssertPost( it1 != fIdentifierMap.end()); 104 98 it1->second = i2; 105 99 106 QcBiMap<AKey>::TIdentifierMap::iterator it2 = fIdentifierMap.find( ident2);100 typename QcBiMap<AKey>::TIdentifierMap::iterator it2 = fIdentifierMap.find( ident2); 107 101 qcAssertPost( it2 != fIdentifierMap.end()); 108 102 it2->second = i1; 109 103 } 110 104 111 105 112 106 113 #line 156 "QcBiMap.ch"114 107 TMPL 115 108 inline void 116 109 QcBiMap<AKey>::Update(const AKey &ident, int index) … … 127 120 fIndexMap[ index] = ident; 128 121 129 122 // Insert ident->index mapping. 130 TIdentifierMap::value_type ins (ident, index);131 typedef pair<TIdentifierMap::iterator, bool> insResultT;123 typename TIdentifierMap::value_type ins (ident, index); 124 typedef std::pair<typename TIdentifierMap::iterator, bool> insResultT; 132 125 dbgPre(insResultT insResult =) 133 126 fIdentifierMap.insert (ins); 134 127 … … 144 137 //-----------------------------------------------------------------------// 145 138 146 139 147 #line 209 "QcBiMap.ch"148 140 TMPL 149 141 inline AKey & 150 142 QcBiMap<AKey>::Identifier(int index) … … 159 151 inline AKey & 160 152 QcBiMap<AKey>::Identifier(char const *n) 161 153 { 162 QcBiMap<AKey>::TIdentifierMap::iterator iIt = fIdentifierMap.begin();154 typename QcBiMap<AKey>::TIdentifierMap::iterator iIt = fIdentifierMap.begin(); 163 155 164 156 while(iIt != fIdentifierMap.end()) 165 157 { … … 174 166 175 167 176 168 177 #line 242 "QcBiMap.ch"178 169 TMPL 179 170 inline int 180 171 QcBiMap<AKey>::Index(AKey const &ident) const 181 172 { 182 QcBiMap<AKey>::TIdentifierMap::const_iterator iIt = fIdentifierMap.find( ident);173 typename QcBiMap<AKey>::TIdentifierMap::const_iterator iIt = fIdentifierMap.find( ident); 183 174 qcAssertPre( iIt != fIdentifierMap.end()); 184 175 unsigned ix = iIt->second; 185 176 qcAssertPost( (ix < fIndexMap.size()) … … 189 180 190 181 191 182 192 #line 260 "QcBiMap.ch"193 183 TMPL 194 184 inline int 195 185 QcBiMap<AKey>::safeIndex(AKey const &ident) const 196 186 { 197 QcBiMap<AKey>::TIdentifierMap::const_iterator iIt = fIdentifierMap.find( ident);187 typename QcBiMap<AKey>::TIdentifierMap::const_iterator iIt = fIdentifierMap.find( ident); 198 188 if(iIt == fIdentifierMap.end()) 199 189 return -1; 200 190 int ix = iIt->second; … … 209 199 #ifndef qcNoStream 210 200 TMPL 211 201 inline void 212 QcBiMap<AKey>::Print( ostream &os) const202 QcBiMap<AKey>::Print(std::ostream &os) const 213 203 { 214 os << "Map start:" << endl;204 os << "Map start:" << std::endl; 215 205 216 206 for (unsigned int i = 0; i < fIndexMap.size(); i++) 217 os << i << " -> " << fIndexMap[i] << endl;207 os << i << " -> " << fIndexMap[i] << std::endl; 218 208 219 os << "Reverse Map:" << endl;220 QcBiMap<AKey>::TIdentifierMap::const_iterator itF;209 os << "Reverse Map:" << std::endl; 210 typename QcBiMap<AKey>::TIdentifierMap::const_iterator itF; 221 211 222 212 for (itF = fIdentifierMap.begin(); itF != fIdentifierMap.end(); ++itF) 223 os << (*itF).first << " -> " << (*itF).second << endl;213 os << (*itF).first << " -> " << (*itF).second << std::endl; 224 214 225 os << "Map end." << endl;215 os << "Map end." << std::endl; 226 216 } 227 217 #endif /* !qcNoStream */ 228 218 229 219 230 #line 315 "QcBiMap.ch"231 220 #undef TMPL 232 221 233 222 /* -
qoca/QcLinEqTableau.cc
34 34 #include "qoca/QcDenseTableauRowIterator.hh" 35 35 #include "qoca/QcDenseTableauColIterator.hh" 36 36 37 using namespace std; 38 37 39 #ifndef NDEBUG 38 40 void 39 41 QcLinEqTableau::assertDeepInvar() const -
qoca/QcDelLinEqSystem.hh
62 62 // inherited from Solver since variable weights have no effect on // 63 63 // QcLinEqSystem::Resolve. // 64 64 //-----------------------------------------------------------------------// 65 virtual void TransitiveClosure( vector<unsigned int> &vars)65 virtual void TransitiveClosure(std::vector<unsigned int> &vars) 66 66 { fTableau.TransitiveClosure(vars); } 67 67 68 68 //-----------------------------------------------------------------------// -
qoca/QcSolver.H
1 1 // Generated automatically from QcSolver.ch by /home/pmoulder/usr/local/bin/ch2xx. 2 2 #ifndef QcSolverDCL 3 3 #define QcSolverDCL 4 #line 1 "QcSolver.ch"5 4 // $Id: QcSolver.ch,v 1.21 2001/01/30 01:32:08 pmoulder Exp $ 6 5 7 6 //============================================================================// … … 28 27 // included with the above copyright notice. // 29 28 //============================================================================// 30 29 31 #include <vector .h>32 #include <algo .h>30 #include <vector> 31 #include <algorithm> 33 32 #include "qoca/QcConstraint.hh" 34 33 35 34 … … 42 41 // Constructor. // 43 42 //-----------------------------------------------------------------------// 44 43 inline QcSolver(); 45 #line 46 "QcSolver.ch"46 44 virtual ~QcSolver() 47 45 { 48 46 } … … 52 50 #if qcCheckInternalInvar 53 51 inline void 54 52 assertInvar() const; 55 #line 59 "QcSolver.ch"56 53 void 57 54 assertDeepInvar() const; 58 #line 74 "QcSolver.ch"59 55 virtual void 60 56 vAssertDeepInvar() const; 61 #line 79 "QcSolver.ch"62 57 #endif 63 58 64 59 … … 78 73 79 74 void 80 75 addVar (QcFloatRep *v); 81 #line 109 "QcSolver.ch"82 76 static void bad_call (char const *method) __attribute__ ((__noreturn__)); 83 77 84 #line 118 "QcSolver.ch"85 78 /** Removes variable from solver and returns true provided <tt>v</tt> is 86 79 free. Does nothing and returns false if <tt>v</tt> is not free. 87 80 … … 91 84 **/ 92 85 virtual bool 93 86 RemoveVar (QcFloat &v); 94 #line 133 "QcSolver.ch"95 87 bool 96 88 removeVar (QcFloatRep *v) 97 89 { … … 106 98 **/ 107 99 virtual inline void 108 100 SuggestValue(QcFloat &v, numT desval); 109 #line 152 "QcSolver.ch"110 101 /** Sets the desired value of all registered variables to their current 111 102 value. Useful in some situations after a solve. */ 112 103 virtual void RestSolver() = 0; … … 125 116 the solver, a warning is issued if safety checks are enabled. 126 117 **/ 127 118 virtual bool IsFree (QcFloat const &v) const; 128 #line 176 "QcSolver.ch"129 119 /** Indicates if a variable used by the tableau is basic. It is an 130 120 error to call <tt>IsBasic</tt> for a variable not used by the the 131 121 solver; a warning is issued in this case if safety checks are … … 146 136 **/ 147 137 bool 148 138 IsEditVar(QcFloat const &v) const; 149 #line 207 "QcSolver.ch"150 139 bool isEditVar (QcFloatRep const *v) const 151 140 { 152 141 QcFloat v1(v); … … 169 158 170 159 virtual void 171 160 AddEditVar(QcFloat &v); 172 #line 235 "QcSolver.ch"173 161 void addEditVar (QcFloatRep *v) 174 162 { 175 163 QcFloat v1 (v); … … 205 193 206 194 virtual void 207 195 EndEdit(); 208 #line 280 "QcSolver.ch"209 196 /** Synonym of <tt>EndEdit</tt>. */ 210 197 void endEdit() 211 198 { EndEdit(); } … … 219 206 inconsistant since the last call to <tt>ClearInconsistant</tt>. 220 207 The handles are stored in the order in which they were encountered. 221 208 **/ 222 inline vector<QcConstraint> const &Inconsistant() const; 223 #line 299 "QcSolver.ch" 209 inline std::vector<QcConstraint> const &Inconsistant() const; 224 210 virtual void ClearInconsistant() 225 211 { fInconsistant.resize(0); } 226 212 … … 235 221 **/ 236 222 bool swallow (QcSolver *other); 237 223 238 #line 333 "QcSolver.ch"239 224 /** If <tt>c</tt> is consistent with the other constraints in this 240 225 solver, then add <tt>c</tt> to this solver and return 241 226 <tt>true</tt>; otherwise simply return <tt>false</tt>. The … … 288 273 289 274 void 290 275 AddWeightedConstraint(QcConstraint &c, numT weight); 291 #line 443 "QcSolver.ch"292 276 /** Marks the beginning of a batch of AddConstraint operation. 293 277 294 278 @precondition <tt>!inBatch()</tt> 295 279 **/ 296 280 inline virtual void 297 281 BeginAddConstraint(); 298 #line 457 "QcSolver.ch"299 282 /** Returns <tt>true</tt> iff batch constraint mode is active, i.e. there 300 283 has been a call to <tt>BeginAddConstraint</tt> not followed by an 301 284 <tt>EndAddConstraint</tt> call. 302 285 **/ 303 286 inline bool 304 287 inBatch(); 305 #line 467 "QcSolver.ch"306 288 inline bool 307 289 ChangeRHS (QcConstraint &c, numT rhs); 308 #line 473 "QcSolver.ch"309 290 inline bool 310 291 changeRHS (QcConstraintRep *c, numT rhs); 311 #line 479 "QcSolver.ch"312 292 /** Change the rhs of a constraint. */ 313 293 virtual bool ChangeConstraint(QcConstraint &c, numT rhs) = 0; 314 294 … … 329 309 330 310 virtual bool 331 311 EndAddConstraint(); 332 #line 517 "QcSolver.ch"333 312 /** If <tt>c</tt> is in this solver, then remove it and return 334 313 <tt>true</tt>. Does not modify the value of any variable in 335 314 <tt>c</tt>. Returns false if the constraint is not present and 336 315 also issues a warning if safety checks are enabled. 337 316 **/ 338 317 virtual bool RemoveConstraint(QcConstraint &c); 339 #line 530 "QcSolver.ch"340 318 bool removeConstraint (QcConstraintRep *c) 341 319 { 342 320 QcConstraint c1 (c); … … 396 374 /** Add <tt>v</tt> to fEditVars. */ 397 375 inline void 398 376 RegisterEditVar(QcFloat &v); 399 #line 597 "QcSolver.ch"400 377 /** Remove <tt>v</tt> from <tt>fEditVars</tt>. */ 401 378 402 379 virtual void RemoveEditVar (QcFloat &v); 403 #line 617 "QcSolver.ch"404 380 virtual void ClearEditVars() // make fEditVars empty. 405 381 { 406 382 fEditVars.resize(0); … … 414 390 //-----------------------------------------------------------------------// 415 391 416 392 417 virtual void Print (ostream &os) const; 418 #line 642 "QcSolver.ch" 393 virtual void Print (std::ostream &os) const; 419 394 /** Erase everything ready to start afresh. */ 420 395 421 396 virtual void 422 397 Restart(); 423 #line 653 "QcSolver.ch"424 398 #if qcCheckPost 425 399 public: 426 400 inline bool 427 401 hasConstraint(QcConstraintRep const *c) const; 428 #line 664 "QcSolver.ch"429 402 inline bool 430 403 hasConstraint(QcConstraint const &c) const; 431 #line 671 "QcSolver.ch"432 404 void checkSatisfied() const; 433 #line 680 "QcSolver.ch"434 405 protected: 435 406 inline void 436 407 addCheckedConstraint(QcConstraintRep *c); 437 #line 689 "QcSolver.ch"438 408 void 439 409 removeCheckedConstraint(QcConstraintRep *c); 440 #line 723 "QcSolver.ch"441 410 inline void 442 411 changeCheckedConstraint(QcConstraintRep *oldc, numT rhs); 443 #line 729 "QcSolver.ch" 444 inline vector<QcConstraintRep *>::const_iterator 412 inline std::vector<QcConstraintRep *>::const_iterator 445 413 checkedConstraints_abegin() const; 446 #line 735 "QcSolver.ch" 447 inline vector<QcConstraintRep *>::const_iterator 414 inline std::vector<QcConstraintRep *>::const_iterator 448 415 checkedConstraints_aend() const; 449 #line 741 "QcSolver.ch" 450 inline vector<QcConstraintRep *>::size_type 416 inline std::vector<QcConstraintRep *>::size_type 451 417 checkedConstraints_size() const; 452 #line 747 "QcSolver.ch"453 418 #endif 454 419 455 420 456 421 protected: 457 vector<QcConstraint> fInconsistant; // Records inconsistant constraints458 vector<QcFloat> fEditVars; // Used for Edit/Resolve422 std::vector<QcConstraint> fInconsistant; // Records inconsistant constraints 423 std::vector<QcFloat> fEditVars; // Used for Edit/Resolve 459 424 bool fEditVarsSetup; // Used for Edit/Resolve 460 425 bool fAutoSolve; 461 426 bool fBatchAddConst; 462 427 bool fBatchAddConstFail; 463 vector<QcConstraint> fBatchConstraints;428 std::vector<QcConstraint> fBatchConstraints; 464 429 465 430 #if qcCheckPost 466 431 private: 467 vector<QcConstraintRep *> checkedConstraints;432 std::vector<QcConstraintRep *> checkedConstraints; 468 433 #endif 469 434 470 435 … … 473 438 474 439 475 440 #ifndef qcNoStream 476 inline ostream &operator<< (ostream &os, const QcSolver &s); 477 #line 775 "QcSolver.ch" 441 inline std::ostream &operator<< (std::ostream &os, const QcSolver &s); 478 442 #endif 479 443 480 444 /* -
qoca/QcNullableElement.hh
160 160 161 161 #ifndef qcNoStream 162 162 template <class ElementRep, class ElementRef> 163 inline ostream &operator<<(ostream &os, QcNullableElement<ElementRep, ElementRef> const &cf)163 inline std::ostream &operator<<(std::ostream &os, QcNullableElement<ElementRep, ElementRef> const &cf) 164 164 { 165 165 reinterpret_cast<ElementRef const &>(cf).Print(os); 166 166 return os; -
qoca/QcCassSolver.cc
29 29 #include "qoca/QcStructVarIndexIterator.hh" 30 30 #include "qoca/QcVariableIndexIterator.hh" 31 31 32 using namespace std; 33 32 34 QcCassSolver::~QcCassSolver() 33 35 { 34 36 // Deallocate memory allocated to Cassowary stay constraints. -
qoca/QcLinEqSystem.hh
27 27 #ifndef __QcLinEqSystemH 28 28 #define __QcLinEqSystemH 29 29 30 #include <vector .h>30 #include <vector> 31 31 #include "qoca/QcSolver.hh" 32 32 #include "qoca/QcLinEqTableau.hh" 33 33 #include "qoca/QcConstraint.hh" … … 41 41 typedef QcVariableBiMap::const_identifier_iterator const_var_iterator; 42 42 43 43 protected: 44 vector<unsigned int> fDepVars;45 vector<unsigned int> fParsOfInterest;46 vector<unsigned int> fVarsByIndex; // Indices of variables of interest.47 vector<numT> fDepVarBaseVals; // Used for Resolve48 vector<vector<QcSparseCoeff> > fDepVarCoeffs;44 std::vector<unsigned int> fDepVars; 45 std::vector<unsigned int> fParsOfInterest; 46 std::vector<unsigned int> fVarsByIndex; // Indices of variables of interest. 47 std::vector<numT> fDepVarBaseVals; // Used for Resolve 48 std::vector<std::vector<QcSparseCoeff> > fDepVarCoeffs; 49 49 // fDepVarCoeffs is a partial map from dependant variable index 50 50 // to a vector (used as a list) of sparse coefficients. 51 51 … … 167 167 //-----------------------------------------------------------------------// 168 168 // Utility functions. // 169 169 //-----------------------------------------------------------------------// 170 virtual void Print( ostream &os) const;170 virtual void Print(std::ostream &os) const; 171 171 virtual void Restart(); 172 172 // Erase everything ready to start afresh. 173 173 174 174 QcFloat &GetVariable(const char *n) const 175 175 { return fVBiMap.Identifier(n); } 176 176 177 void GetVariableSet( vector<QcFloat> &vars) const177 void GetVariableSet(std::vector<QcFloat> &vars) const 178 178 { fVBiMap.GetVariableSet(vars); } 179 179 180 180 const_var_iterator getVariables_begin() const … … 235 235 return true; 236 236 } 237 237 238 inline void QcLinEqSystem::Print( ostream &os) const238 inline void QcLinEqSystem::Print(std::ostream &os) const 239 239 { 240 240 QcSolver::Print(os); 241 241 fNotifier.Print(os); 242 os << endl;242 os << std::endl; 243 243 fTableau.Print(os); 244 244 } 245 245 -
qoca/QcBiMap.H
1 1 // Generated automatically from QcBiMap.ch by /home/pmoulder/usr/local/bin/ch2xx. 2 2 #ifndef QcBiMapDCL 3 3 #define QcBiMapDCL 4 #line 1 "QcBiMap.ch"5 4 6 #include <iostream .h>7 #include <map .h>8 #include <vector .h>5 #include <iostream> 6 #include <map> 7 #include <vector> 9 8 #include "qoca/QcDefines.hh" 10 9 #include "qoca/KeyIterator.hh" 11 10 … … 24 23 25 24 26 25 27 template< classAKey>26 template<typename AKey> 28 27 class QcBiMap 29 28 { 30 29 … … 44 43 45 44 inline void 46 45 assertInvar() const; 47 #line 63 "QcBiMap.ch"48 46 inline void 49 47 assertDeepInvar() const; 50 #line 70 "QcBiMap.ch"51 48 virtual inline void 52 49 vAssertDeepInvar() const; 53 #line 75 "QcBiMap.ch"54 50 #endif 55 51 56 52 57 53 protected: 58 typedef map<AKey, int,less<AKey> > TIdentifierMap;59 typedef vector<AKey> TIndexMap;54 typedef std::map<AKey, int, std::less<AKey> > TIdentifierMap; 55 typedef std::vector<AKey> TIndexMap; 60 56 61 57 public: 62 typedef KeyIterator< TIdentifierMap::const_iterator, AKey> const_identifier_iterator;58 typedef KeyIterator<typename TIdentifierMap::const_iterator, AKey> const_identifier_iterator; 63 59 64 60 65 61 //-----------------------------------------------------------------------// … … 72 68 73 69 inline void 74 70 EraseByIndex(int index); 75 #line 107 "QcBiMap.ch"76 71 /** Erase everything ready to start afresh. */ 77 72 78 73 inline void 79 74 Restart(); 80 #line 117 "QcBiMap.ch"81 75 /** Swap the mappings around so that {ix1 ↔ id1, ix2 ↔ id2} 82 76 becomes {ix1 ↔ id2, ix2 ↔ id1}. 83 77 … … 87 81 88 82 inline void 89 83 SwapByIndex(int i1, int i2); 90 #line 147 "QcBiMap.ch"91 84 /** Insert the mapping <tt>ident</tt> ↔ <tt>index</tt> into this 92 85 bimap. 93 86 … … 100 93 101 94 inline void 102 95 Update(const AKey &ident, int index); 103 #line 184 "QcBiMap.ch"104 96 //-----------------------------------------------------------------------// 105 97 // Query functions. // 106 98 //-----------------------------------------------------------------------// … … 117 109 const_identifier_iterator 118 110 getIdentifiers_begin() const 119 111 { 120 TIdentifierMap::const_iterator i = fIdentifierMap.begin();112 typename TIdentifierMap::const_iterator i = fIdentifierMap.begin(); 121 113 return const_identifier_iterator (i); 122 114 } 123 115 … … 129 121 130 122 inline AKey & 131 123 Identifier(int index); 132 #line 220 "QcBiMap.ch"133 124 inline AKey & 134 125 Identifier(char const *n); 135 #line 237 "QcBiMap.ch"136 126 /** Return the index associated with <tt>ident</tt>. 137 127 138 128 @precondition <tt>IdentifierPresent(ident)</tt> … … 141 131 142 132 inline int 143 133 Index(AKey const &ident) const; 144 #line 255 "QcBiMap.ch"145 134 /** Return the index associated with <tt>ident</tt>, 146 135 or -1 if <tt>ident</tt> is not present. 147 136 … … 150 139 151 140 inline int 152 141 safeIndex(AKey const &ident) const; 153 #line 273 "QcBiMap.ch"154 142 //-----------------------------------------------------------------------// 155 143 // Utility functions. // 156 144 //-----------------------------------------------------------------------// 157 145 #ifndef qcNoStream 158 146 159 147 inline void 160 Print(ostream &os) const; 161 #line 294 "QcBiMap.ch" 148 Print(std::ostream &os) const; 162 149 #endif /* !qcNoStream */ 163 150 164 151 … … 172 159 173 160 #ifndef qcNoStream 174 161 template<class AKey> 175 ostream &operator<<(ostream &os, const QcBiMap<AKey> &bm)162 std::ostream &operator<<(std::ostream &os, const QcBiMap<AKey> &bm) 176 163 { 177 164 bm.Print(os); 178 165 return os; -
qoca/QcQuasiColState.hh
49 49 //-----------------------------------------------------------------------// 50 50 // Utililty functions. // 51 51 //-----------------------------------------------------------------------// 52 virtual void Print( ostream &os)52 virtual void Print(std::ostream &os) 53 53 { os << "Index(" << fIndex << ")"; } 54 54 55 55 public: -
qoca/QcLinInEqTableau.cc
25 25 //============================================================================// 26 26 27 27 #include <math.h> 28 #include <vector .h>28 #include <vector> 29 29 #include "qoca/QcDefines.hh" 30 30 #include "qoca/QcLinInEqTableau.hh" 31 31 #include "qoca/QcConstraintIndexIterator.hh" … … 34 34 #include "qoca/QcVariableIndexIterator.hh" 35 35 #include "qoca/QcTableauRowIterator.hh" 36 36 37 using namespace std; 38 37 39 int QcLinInEqTableau::AddArtificial(numT coeff) 38 40 { 39 41 unsigned vi = IncreaseColumns(); -
qoca/QcQuasiRowStateVector.cc
1 1 // Generated automatically from QcQuasiRowStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx. 2 2 #include "QcQuasiRowStateVector.hh" 3 #line 1 "QcQuasiRowStateVector.ch"4 3 // $Id: QcQuasiRowStateVector.ch,v 1.1 2000/11/29 01:49:41 pmoulder Exp $ 5 4 6 5 //============================================================================// … … 30 29 #include "qoca/QcStateVector.hh" 31 30 #include "qoca/QcQuasiRowState.hh" 32 31 32 using namespace std; 33 33 34 34 35 35 36 36 37 37 38 39 #line 78 "QcQuasiRowStateVector.ch"40 38 void 41 39 QcQuasiRowStateVector::SetMRowDeleted(unsigned i, bool d) 42 40 { … … 150 148 151 149 152 150 153 #line 260 "QcQuasiRowStateVector.ch"154 151 //-----------------------------------------------------------------------// 155 152 // Utility functions. // 156 153 //-----------------------------------------------------------------------// 157 154 158 155 159 156 void 160 QcQuasiRowStateVector::Print( ostream &os) const157 QcQuasiRowStateVector::Print(std::ostream &os) const 161 158 { 162 os << endl << "Row State Vector:";159 os << std::endl << "Row State Vector:"; 163 160 QcStateVector::Print(os); 164 os << endl << "Row List:";161 os << std::endl << "Row List:"; 165 162 QcQuasiRowState *curr = fRowList; 166 163 167 164 while (curr != 0) 168 165 { 169 166 curr->Print(os); 170 os << endl;167 os << std::endl; 171 168 curr = curr->fNextRow; 172 169 } 173 170 } 174 171 175 172 176 #line 299 "QcQuasiRowStateVector.ch"177 173 /* 178 174 Local Variables: 179 175 mode:c++ -
qoca/Jamfile
47 47 QcSparseMatrix.cc 48 48 QcVarStow.cc 49 49 QcVariableBiMap.cc 50 QcUtility.cc 50 51 : 51 52 $(TARGET_LIBSTDC++) 52 53 ; -
qoca/QcQuasiRowStateVector.H
1 1 // Generated automatically from QcQuasiRowStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx. 2 2 #ifndef QcQuasiRowStateVectorDCL 3 3 #define QcQuasiRowStateVectorDCL 4 #line 1 "QcQuasiRowStateVector.ch"5 4 // $Id: QcQuasiRowStateVector.ch,v 1.1 2000/11/29 01:49:41 pmoulder Exp $ 6 5 7 6 //============================================================================// … … 81 80 82 81 void 83 82 SetMRowDeleted(unsigned i, bool d); 84 #line 94 "QcQuasiRowStateVector.ch"85 83 //-----------------------------------------------------------------------// 86 84 // Manipulation functions. // 87 85 //-----------------------------------------------------------------------// … … 90 88 91 89 virtual void 92 90 AddToList(QcState **start, QcState **finish); 93 #line 120 "QcQuasiRowStateVector.ch"94 91 #ifndef NDEBUG 95 92 public: 96 93 97 94 98 95 void 99 96 assertLinkageInvar() const; 100 #line 155 "QcQuasiRowStateVector.ch"101 97 protected: 102 98 103 99 104 100 virtual void 105 101 virtualAssertLinkageInvar() const; 106 #line 163 "QcQuasiRowStateVector.ch"107 102 #endif 108 103 109 104 public: … … 111 106 112 107 virtual void 113 108 FixLinkage(); 114 #line 189 "QcQuasiRowStateVector.ch"115 109 private: 116 110 117 111 inline void 118 112 LinkRow(unsigned index); 119 #line 199 "QcQuasiRowStateVector.ch"120 113 inline void 121 114 LinkRow(QcQuasiRowState *me); 122 #line 216 "QcQuasiRowStateVector.ch"123 115 inline void 124 116 UnlinkRow(unsigned index); 125 #line 225 "QcQuasiRowStateVector.ch"126 117 inline void 127 118 UnlinkRow(QcQuasiRowState *me); 128 #line 244 "QcQuasiRowStateVector.ch"129 119 protected: 130 120 inline void 131 121 Restart(unsigned i); 132 #line 260 "QcQuasiRowStateVector.ch"133 122 //-----------------------------------------------------------------------// 134 123 // Utility functions. // 135 124 //-----------------------------------------------------------------------// 136 125 public: 137 126 138 127 virtual void 139 Print(ostream &os) const; 140 #line 281 "QcQuasiRowStateVector.ch" 128 Print(std::ostream &os) const; 141 129 private: 142 130 inline QcQuasiRowState * 143 131 getState( unsigned i) const; 144 #line 293 "QcQuasiRowStateVector.ch"145 132 public: 146 133 QcQuasiRowState *fRowList; // head of undeleted fM rows linked list 147 134 -
qoca/QcLinInEqRowColStateVector.cc
1 1 // Generated automatically from QcLinInEqRowColStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx. 2 2 #include "QcLinInEqRowColStateVector.hh" 3 #line 1 "QcLinInEqRowColStateVector.ch"4 3 // $Id: QcLinInEqRowColStateVector.ch,v 1.1 2000/11/29 04:31:16 pmoulder Exp $ 5 4 6 5 //============================================================================// … … 33 32 34 33 35 34 35 using namespace std; 36 36 37 37 38 39 #line 46 "QcLinInEqRowColStateVector.ch"40 38 //-----------------------------------------------------------------------// 41 39 // Manipulation functions. // 42 40 //-----------------------------------------------------------------------// … … 133 131 } 134 132 135 133 136 #line 147 "QcLinInEqRowColStateVector.ch"137 134 /* 138 135 Local Variables: 139 136 mode:c++ -
qoca/QcOrigRowStateVector.cc
1 1 // Generated automatically from QcOrigRowStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx. 2 2 #include "QcOrigRowStateVector.hh" 3 #line 1 "QcOrigRowStateVector.ch"4 3 // $Id: QcOrigRowStateVector.ch,v 1.2 2000/12/06 05:32:56 pmoulder Exp $ 5 4 // Originally written by Alan Finlay and Sitt Sen Chok 6 5 … … 33 32 #include "qoca/QcOrigRowState.hh" 34 33 35 34 35 using namespace std; 36 36 37 37 38 38 39 40 #line 44 "QcOrigRowStateVector.ch"41 39 //-----------------------------------------------------------------------// 42 40 // Query functions. // 43 41 //-----------------------------------------------------------------------// 44 42 45 #line 71 "QcOrigRowStateVector.ch"46 43 //-----------------------------------------------------------------------// 47 44 // Set* functions. 48 45 //-----------------------------------------------------------------------// 49 #line 95 "QcOrigRowStateVector.ch"50 46 //-----------------------------------------------------------------------// 51 47 // Manipulation functions. // 52 48 //-----------------------------------------------------------------------// … … 113 109 { 114 110 QcOrigRowState const *state = CAST(QcOrigRowState const *, *i); 115 111 assert( state->fRHS == 0.0); 116 assert( state->fMRowIndex == i - fStates); 112 // TODO: Find out why this is borked ... 113 //assert( state->fMRowIndex == i - fStates); 117 114 assert( !state->fARowDeleted); 118 115 } 119 116 } … … 121 118 122 119 123 120 124 #line 191 "QcOrigRowStateVector.ch"125 121 /* 126 122 Local Variables: 127 123 mode:c++ -
qoca/QcLinEqSolver.hh
40 40 #else 41 41 QcDelLinEqSystem fSubSystem; 42 42 #endif 43 vector<QcFloat> fDesValVar;44 vector<unsigned int> fDepPars;45 vector<unsigned int> fVarsByIndex;46 vector<bool> fDepBasicVars;43 std::vector<QcFloat> fDesValVar; 44 std::vector<unsigned int> fDepPars; 45 std::vector<unsigned int> fVarsByIndex; 46 std::vector<bool> fDepBasicVars; 47 47 48 48 QcVariableBiMap &fVBiMap; 49 49 const QcBiMapNotifier &fNotifier; … … 136 136 //-----------------------------------------------------------------------// 137 137 void GenerateKT1(QcFloat &p, QcSparseMatrix &ccache 138 138 #ifndef qcRealTableauRHS 139 , vector<numT> &crhs139 , std::vector<numT> &crhs 140 140 #endif 141 141 ); 142 142 // Generate the constraint df'/dp == 0 … … 148 148 149 149 void GenerateKT2(QcFloat &p, QcSparseMatrix &ccache 150 150 #ifndef qcRealTableauRHS 151 , vector<numT> &crhs151 , std::vector<numT> &crhs 152 152 #endif 153 153 ); 154 154 // Generate the constraint df'/dp == 0 where parameters of interest … … 169 169 QcFloat GetVariable(const char *n) 170 170 { return fSystem.GetVariable(n); } 171 171 172 void GetVariableSet( vector<QcFloat> &vars)172 void GetVariableSet(std::vector<QcFloat> &vars) 173 173 { fSystem.GetVariableSet(vars); } 174 174 175 virtual void QcLinEqSolver::Print( ostream &os) const;175 virtual void QcLinEqSolver::Print(std::ostream &os) const; 176 176 }; 177 177 178 178 inline QcLinEqSolver::QcLinEqSolver() -
qoca/QcIneqSolverBase.cc
1 1 // Generated automatically from QcIneqSolverBase.ch by /home/pmoulder/usr/local/bin/ch2xx. 2 2 #include "QcIneqSolverBase.hh" 3 #line 1 "QcIneqSolverBase.ch"4 3 5 4 #include <qoca/QcSolver.hh> 6 5 … … 10 9 11 10 12 11 13 #line 80 "QcIneqSolverBase.ch"14 12 //-----------------------------------------------------------------------// 15 13 // Constraint management methods // 16 14 //-----------------------------------------------------------------------// … … 48 46 } 49 47 50 48 51 #line 131 "QcIneqSolverBase.ch"52 49 bool 53 50 QcIneqSolverBase::ChangeConstraint(QcConstraint &oldc, numT rhs) 54 51 { … … 77 74 } 78 75 79 76 80 #line 173 "QcIneqSolverBase.ch"81 77 /* 82 78 Local Variables: 83 79 mode:c++ -
qoca/QcSolver.hh
2 2 #include "QcSolver.H" 3 3 #ifndef QcSolverIFN 4 4 #define QcSolverIFN 5 #line 1 "QcSolver.ch"6 5 // $Id: QcSolver.ch,v 1.21 2001/01/30 01:32:08 pmoulder Exp $ 7 6 8 7 //============================================================================// … … 29 28 // included with the above copyright notice. // 30 29 //============================================================================// 31 30 32 #include <vector .h>33 #include <algo .h>31 #include <vector> 32 #include <algorithm> 34 33 #include "qoca/QcConstraint.hh" 35 34 36 35 … … 48 47 } 49 48 50 49 51 #line 52 "QcSolver.ch"52 50 #if qcCheckInternalInvar 53 51 inline void 54 52 QcSolver::assertInvar() const … … 56 54 } 57 55 58 56 59 #line 79 "QcSolver.ch"60 57 #endif 61 58 62 59 … … 65 62 //-----------------------------------------------------------------------// 66 63 67 64 68 #line 145 "QcSolver.ch"69 65 inline void 70 66 QcSolver::SuggestValue(QcFloat &v, numT desval) 71 67 { … … 81 77 // Enquiry functions for variables // 82 78 //-----------------------------------------------------------------------// 83 79 84 #line 214 "QcSolver.ch"85 80 /* ---------------------------------------------------------------------- 86 81 High Level Edit Variable Interface for use by solver clients. Edit 87 82 variables are set and unset with the following interface. The … … 95 90 96 91 97 92 98 #line 285 "QcSolver.ch"99 93 //-----------------------------------------------------------------------// 100 94 // Constraint management methods // 101 95 //-----------------------------------------------------------------------// 102 96 103 97 104 #line 293 "QcSolver.ch" 105 inline vector<QcConstraint> const &QcSolver::Inconsistant() const 98 inline std::vector<QcConstraint> const &QcSolver::Inconsistant() const 106 99 { 107 100 return fInconsistant; 108 101 } 109 102 110 103 111 #line 447 "QcSolver.ch"112 104 inline void 113 105 QcSolver::BeginAddConstraint() 114 106 { … … 120 112 } 121 113 122 114 123 #line 461 "QcSolver.ch"124 115 inline bool 125 116 QcSolver::inBatch() 126 117 { … … 143 134 144 135 145 136 146 #line 546 "QcSolver.ch"147 137 //-----------------------------------------------------------------------// 148 138 // Constraint Solving methods // 149 139 //-----------------------------------------------------------------------// 150 140 151 #line 579 "QcSolver.ch"152 141 //-----------------------------------------------------------------------// 153 142 // Low Level Edit Variable Interface for use by solvers. These functions // 154 143 // manipulate the set of edit variables without any adjustment of the // … … 169 158 170 159 171 160 172 #line 625 "QcSolver.ch"173 161 //-----------------------------------------------------------------------// 174 162 // Utility functions. // 175 163 //-----------------------------------------------------------------------// 176 164 177 165 178 #line 653 "QcSolver.ch"179 166 #if qcCheckPost 180 167 181 168 inline bool … … 194 181 } 195 182 196 183 197 #line 681 "QcSolver.ch"198 184 inline void 199 185 QcSolver::addCheckedConstraint(QcConstraintRep *c) 200 186 { … … 203 189 } 204 190 205 191 206 #line 723 "QcSolver.ch"207 192 inline void 208 193 QcSolver::changeCheckedConstraint(QcConstraintRep *oldc, numT rhs) 209 194 { 210 195 oldc->SetRHS( rhs); 211 196 } 212 197 213 inline vector<QcConstraintRep *>::const_iterator198 inline std::vector<QcConstraintRep *>::const_iterator 214 199 QcSolver::checkedConstraints_abegin() const 215 200 { 216 201 return checkedConstraints.begin(); 217 202 } 218 203 219 inline vector<QcConstraintRep *>::const_iterator204 inline std::vector<QcConstraintRep *>::const_iterator 220 205 QcSolver::checkedConstraints_aend() const 221 206 { 222 207 return checkedConstraints.end(); 223 208 } 224 209 225 inline vector<QcConstraintRep *>::size_type210 inline std::vector<QcConstraintRep *>::size_type 226 211 QcSolver::checkedConstraints_size() const 227 212 { 228 213 return checkedConstraints.size(); … … 231 216 #endif 232 217 233 218 234 #line 769 "QcSolver.ch"235 219 #ifndef qcNoStream 236 inline ostream &operator<< (ostream &os, const QcSolver &s)220 inline std::ostream &operator<< (std::ostream &os, const QcSolver &s) 237 221 { 238 222 s.Print (os); 239 223 return os; -
qoca/QcState.hh
27 27 #ifndef __QcStateH 28 28 #define __QcStateH 29 29 30 #include <iostream .h>30 #include <iostream> 31 31 32 32 class QcState 33 33 { … … 37 37 //-----------------------------------------------------------------------// 38 38 // Utililty functions. // 39 39 //-----------------------------------------------------------------------// 40 virtual void Print( ostream &os) = 0;40 virtual void Print(std::ostream &os) = 0; 41 41 }; 42 42 43 43 #endif -
qoca/QcQuasiRowColStateVector.H
1 1 // Generated automatically from QcQuasiRowColStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx. 2 2 #ifndef QcQuasiRowColStateVectorDCL 3 3 #define QcQuasiRowColStateVectorDCL 4 #line 1 "QcQuasiRowColStateVector.ch"5 4 // $Id: QcQuasiRowColStateVector.ch,v 1.4 2001/01/30 01:32:08 pmoulder Exp $ 6 5 7 6 //============================================================================// … … 28 27 // included with the above copyright notice. // 29 28 //============================================================================// 30 29 31 #include <iostream .h>30 #include <iostream> 32 31 #include <qoca/QcQuasiRowStateVector.H> 33 32 34 33 #include <qoca/QcQuasiColStateVector.hh> … … 43 42 inline 44 43 QcQuasiRowColStateVector(QcQuasiRowStateVector *rs, 45 44 QcQuasiColStateVector *cs); 46 #line 47 "QcQuasiRowColStateVector.ch"47 45 protected: 48 46 /** This constructor should only be used by derived classes. The derived 49 47 class should initialize all the member data in this class. */ … … 65 63 //-----------------------------------------------------------------------// 66 64 inline void 67 65 Restart(); 68 #line 73 "QcQuasiRowColStateVector.ch"69 66 inline void 70 67 Reserve(unsigned rows, unsigned cols); 71 #line 80 "QcQuasiRowColStateVector.ch"72 68 #if 0 /* unused */ 73 69 74 70 virtual void 75 71 SwapRows(unsigned c1, unsigned c2); 76 #line 135 "QcQuasiRowColStateVector.ch"77 72 #endif /* unused */ 78 73 79 74 //-----------------------------------------------------------------------// 80 75 // Utility functions. // 81 76 //-----------------------------------------------------------------------// 82 77 inline void 83 Print(ostream &os); 84 #line 148 "QcQuasiRowColStateVector.ch" 78 Print(std::ostream &os); 85 79 public: 86 80 QcQuasiRowStateVector *fRowState; 87 81 QcQuasiColStateVector *fColState; -
qoca/QcDelLinEqTableau.hh
87 87 //-----------------------------------------------------------------------// 88 88 // Utility function. // 89 89 //-----------------------------------------------------------------------// 90 virtual void Print( ostream &os) const;90 virtual void Print(std::ostream &os) const; 91 91 92 virtual void TransitiveClosure( vector<unsigned int> &vars)92 virtual void TransitiveClosure(std::vector<unsigned int> &vars) 93 93 { CAST(QcDelCoreTableau *, fCoreTableau)->TransitiveClosure(vars); } 94 94 95 95 protected: … … 117 117 { 118 118 } 119 119 120 inline void QcDelLinEqTableau::Print( ostream &os) const120 inline void QcDelLinEqTableau::Print(std::ostream &os) const 121 121 { 122 122 QcLinEqTableau::Print(os); 123 123 fCoreTableau->Print(os); 124 os << endl << "Consistant: "125 << (IsValidSolvedForm() ? "yes" : "no") << endl;124 os << std::endl << "Consistant: " 125 << (IsValidSolvedForm() ? "yes" : "no") << std::endl; 126 126 } 127 127 128 128 #endif /* !__QcDelLinEqTableauH */ -
qoca/QcVariableBiMap.hh
2 2 #include "QcVariableBiMap.H" 3 3 #ifndef QcVariableBiMapIFN 4 4 #define QcVariableBiMapIFN 5 #line 1 "QcVariableBiMap.ch"6 5 7 #line 7 "QcVariableBiMap.ch"8 6 #include <qoca/QcAliasedBiMap.hh> 9 7 10 8 11 #line 14 "QcVariableBiMap.ch"12 9 #define super QcAliasedBiMap<QcNullableFloat, QcFloat, QcFloatRep> 13 10 14 11 … … 16 13 17 14 18 15 19 #line 28 "QcVariableBiMap.ch"20 16 #ifndef NDEBUG 21 17 22 #line 53 "QcVariableBiMap.ch"23 18 #endif 24 19 25 20 26 #line 72 "QcVariableBiMap.ch"27 21 //-----------------------------------------------------------------------// 28 22 // Query functions // 29 23 //-----------------------------------------------------------------------// 30 24 31 #line 103 "QcVariableBiMap.ch"32 25 /* 33 26 Local Variables: 34 27 mode:c++ -
qoca/QcLinInEqSystem.hh
97 97 virtual void Solve(); 98 98 99 99 protected: 100 vector<unsigned int> fArtVars;100 std::vector<unsigned int> fArtVars; 101 101 102 102 virtual int AddToTableau(QcConstraint &c); 103 103 // Does first part of addConstraint, calling the correct tableau -
qoca/QcSparseMatrix.cc
34 34 # define MAX(_a, _b) ((_a) > (_b) ? (_a) : (_b)) 35 35 #endif 36 36 37 using namespace std; 38 37 39 QcSparseMatrix::~QcSparseMatrix() 38 40 { 39 41 TrimRows( 0); -
qoca/QcLinEqColStateVector.H
1 1 // Generated automatically from QcLinEqColStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx. 2 2 #ifndef QcLinEqColStateVectorDCL 3 3 #define QcLinEqColStateVectorDCL 4 #line 1 "QcLinEqColStateVector.ch"5 4 // $Id: QcLinEqColStateVector.ch,v 1.2 2000/12/06 05:32:56 pmoulder Exp $ 6 5 7 6 //============================================================================// … … 56 55 57 56 void 58 57 assertLinkageInvar() const; 59 #line 113 "QcLinEqColStateVector.ch"60 58 protected: 61 59 62 60 63 61 virtual void 64 62 virtualAssertLinkageInvar() const; 65 #line 121 "QcLinEqColStateVector.ch"66 63 #endif /* !NDEBUG */ 67 64 68 65 … … 73 70 74 71 inline numT 75 72 GetDesireValue(unsigned i) const; 76 #line 136 "QcLinEqColStateVector.ch"77 73 inline bool 78 74 IsBasic(unsigned i) const; 79 #line 143 "QcLinEqColStateVector.ch"80 75 inline int 81 76 IsBasicIn(unsigned i) const; 82 #line 151 "QcLinEqColStateVector.ch"83 77 //-----------------------------------------------------------------------// 84 78 // Set functions. // 85 79 //-----------------------------------------------------------------------// 86 80 inline void 87 81 SetDesireValue(unsigned i, numT dv) const; 88 #line 161 "QcLinEqColStateVector.ch"89 82 inline QcLinEqColState * 90 83 head( bool isbasic); 91 #line 172 "QcLinEqColStateVector.ch"92 84 void 93 85 SetBasic(unsigned i, bool b); 94 #line 187 "QcLinEqColStateVector.ch"95 86 inline void 96 87 SetBasicIn(unsigned i, int bi) const; 97 #line 195 "QcLinEqColStateVector.ch"98 88 //-----------------------------------------------------------------------// 99 89 // Manipulation functions. // 100 90 //-----------------------------------------------------------------------// 101 91 102 92 virtual void 103 93 FixLinkage(); 104 #line 223 "QcLinEqColStateVector.ch"105 94 inline void 106 95 Link(QcLinEqColState *state, QcLinEqColState *head); 107 #line 238 "QcLinEqColStateVector.ch"108 96 inline void 109 97 Unlink(QcLinEqColState *state); 110 #line 251 "QcLinEqColStateVector.ch"111 98 protected: 112 99 113 100 114 101 virtual void 115 102 Alloc(QcState **start, QcState **finish); 116 #line 269 "QcLinEqColStateVector.ch"117 103 virtual void 118 104 AddToList(QcState **start, QcState **finish); 119 #line 292 "QcLinEqColStateVector.ch"120 105 virtual void 121 106 RemoveFromList(QcState **start, QcState **finish); 122 #line 310 "QcLinEqColStateVector.ch"123 107 public: 124 108 125 109 126 110 virtual void 127 Print(ostream &os) const; 128 #line 339 "QcLinEqColStateVector.ch" 111 Print(std::ostream &os) const; 129 112 private: 130 113 inline QcLinEqColState * 131 114 getState(unsigned i) const; 132 #line 351 "QcLinEqColStateVector.ch"133 115 public: 134 116 QcLinEqColState fParamHead; // head of linked list of non-basic variables. 135 117 QcLinEqColState fBasicHead; // head of linked list of basic variables. -
qoca/QcConstraint.hh
184 184 //------------------------------------------------------------------------// 185 185 // Utility functions // 186 186 //------------------------------------------------------------------------// 187 void Print( ostream &os) const187 void Print(std::ostream &os) const 188 188 { fRep->Print(os); } 189 189 190 190 bool isDead() const … … 312 312 #endif /* QOCA_NO_FANCY_OPERATORS */ 313 313 314 314 #ifndef qcNoStream 315 inline ostream &operator<<(ostream &os, const QcConstraint &c)315 inline std::ostream &operator<<(std::ostream &os, const QcConstraint &c) 316 316 { 317 317 c.Print(os); 318 318 return os; -
qoca/QcLinPoly.hh
109 109 //-----------------------------------------------------------------------// 110 110 // Utility functions // 111 111 //-----------------------------------------------------------------------// 112 virtual void Print( ostream &os) const;112 virtual void Print(std::ostream &os) const; 113 113 114 114 private: 115 115 void doPlus(numT coeff, QcFloatRep *var); … … 199 199 } 200 200 201 201 #ifndef qcNoStream 202 inline ostream& operator<<(ostream &os, const QcLinPoly &p)202 inline std::ostream& operator<<(std::ostream &os, const QcLinPoly &p) 203 203 { 204 204 p.Print(os); 205 205 return os; -
qoca/QcLinInEqSolver.hh
150 150 void SubSysEqSolve(); 151 151 152 152 public: 153 virtual void Print( ostream &os) const;153 virtual void Print(std::ostream &os) const; 154 154 virtual void Restart(); 155 155 void TransitiveClosure(); 156 156 // Calculate fDepBasicVars and fDepPars as transitive closure of … … 226 226 } 227 227 228 228 private: 229 vector<QcNullableFloat> fDual; // The complementary variables.230 vector<unsigned int> fDualIndex; // The complementary variable indices.229 std::vector<QcNullableFloat> fDual; // The complementary variables. 230 std::vector<unsigned int> fDualIndex; // The complementary variable indices. 231 231 }; 232 232 233 233 … … 262 262 /** Index of artificial variable in fSubSystem. */ 263 263 int fAI; 264 264 265 vector<unsigned int> fDepPars;266 vector<unsigned int> fVarsByIndex;267 vector<bool> fDepBasicVars;268 vector<bool> fDepParVars;269 vector<QcFloat> fDesValVar;270 vector<int> fDesValIndex;265 std::vector<unsigned int> fDepPars; 266 std::vector<unsigned int> fVarsByIndex; 267 std::vector<bool> fDepBasicVars; 268 std::vector<bool> fDepParVars; 269 std::vector<QcFloat> fDesValVar; 270 std::vector<int> fDesValIndex; 271 271 272 272 QcVariableBiMap &fVBiMap; 273 273 const QcBiMapNotifier &fNotifier; -
qoca/QcException.hh
31 31 #include "qoca/QcDefines.hh" 32 32 33 33 #ifndef qcNoStream 34 #include <iostream .h>34 #include <iostream> 35 35 #endif 36 36 37 37 //#ifdef DEBUG -
qoca/QcLinEqSystem.cc
38 38 #include "qoca/QcConstraintIndexIterator.hh" 39 39 #include "qoca/QcDenseTableauRowIterator.hh" 40 40 41 using namespace std; 42 41 43 #if qcCheckInternalInvar 42 44 void QcLinEqSystem::assertDeepInvar() const 43 45 { -
qoca/QcOrigRowStateVector.H
1 1 // Generated automatically from QcOrigRowStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx. 2 2 #ifndef QcOrigRowStateVectorDCL 3 3 #define QcOrigRowStateVectorDCL 4 #line 1 "QcOrigRowStateVector.ch"5 4 // $Id: QcOrigRowStateVector.ch,v 1.2 2000/12/06 05:32:56 pmoulder Exp $ 6 5 // Originally written by Alan Finlay and Sitt Sen Chok 7 6 … … 41 40 42 41 inline 43 42 QcOrigRowStateVector(); 44 #line 44 "QcOrigRowStateVector.ch"45 43 //-----------------------------------------------------------------------// 46 44 // Query functions. // 47 45 //-----------------------------------------------------------------------// 48 46 49 47 inline bool 50 48 GetARowDeleted(unsigned i) const; 51 #line 55 "QcOrigRowStateVector.ch"52 49 inline int 53 50 GetMRowIndex(unsigned i) const; 54 #line 63 "QcOrigRowStateVector.ch"55 51 inline numT 56 52 GetRHS(unsigned i) const; 57 #line 71 "QcOrigRowStateVector.ch"58 53 //-----------------------------------------------------------------------// 59 54 // Set* functions. 60 55 //-----------------------------------------------------------------------// 61 56 inline void 62 57 SetARowDeleted(unsigned i, bool d); 63 #line 81 "QcOrigRowStateVector.ch"64 58 inline void 65 59 SetMRowIndex(unsigned i, int ri); 66 #line 88 "QcOrigRowStateVector.ch"67 60 inline void 68 61 SetRHS(unsigned i, numT rhs); 69 #line 95 "QcOrigRowStateVector.ch"70 62 //-----------------------------------------------------------------------// 71 63 // Manipulation functions. // 72 64 //-----------------------------------------------------------------------// 73 65 74 66 virtual void 75 67 FixLinkage(); 76 #line 104 "QcOrigRowStateVector.ch"77 68 protected: 78 69 79 70 80 71 virtual void 81 72 Alloc(QcState **start, QcState **finish); 82 #line 122 "QcOrigRowStateVector.ch"83 73 virtual void 84 74 AddToList(QcState **start, QcState **finish); 85 #line 135 "QcOrigRowStateVector.ch"86 75 virtual void 87 76 RemoveFromList(QcState **start, QcState **finish); 88 #line 152 "QcOrigRowStateVector.ch"89 77 #ifndef NDEBUG 90 78 91 79 virtual void 92 80 virtualAssertLinkageInvar() const; 93 #line 165 "QcOrigRowStateVector.ch"94 81 #endif 95 82 96 83 public: 97 84 98 85 99 86 virtual inline void 100 Print(ostream &os) const; 101 #line 178 "QcOrigRowStateVector.ch" 87 Print(std::ostream &os) const; 102 88 private: 103 89 inline QcOrigRowState * 104 90 getState( unsigned i) const; 105 #line 188 "QcOrigRowStateVector.ch"106 91 }; 107 92 108 93 -
qoca/QcQuasiColStateVector.hh
45 45 //-----------------------------------------------------------------------// 46 46 // Utility functions. // 47 47 //-----------------------------------------------------------------------// 48 virtual void Print( ostream &os) const;48 virtual void Print(std::ostream &os) const; 49 49 }; 50 50 51 51 inline QcQuasiColStateVector::QcQuasiColStateVector() … … 53 53 { 54 54 } 55 55 56 inline void QcQuasiColStateVector::Print( ostream &os) const56 inline void QcQuasiColStateVector::Print(std::ostream &os) const 57 57 { 58 os << endl << "Column State Vector:";58 os << std::endl << "Column State Vector:"; 59 59 QcStateVector::Print(os); 60 60 } 61 61 -
qoca/QcDelCoreTableau.hh
151 151 virtual void ScaleRow(unsigned row, numT factor); 152 152 virtual void CopyColumn(unsigned destCol, unsigned srcCol); 153 153 154 void TransitiveClosure( vector<unsigned int> &vars) const;154 void TransitiveClosure(std::vector<unsigned int> &vars) const; 155 155 // Compute the transitive closure of a set of variables, using the 156 156 // relation "belong to the same original constraint". 157 157 158 158 //-----------------------------------------------------------------------// 159 159 // Utility functions. // 160 160 //-----------------------------------------------------------------------// 161 virtual void Print( ostream &os) const;161 virtual void Print(std::ostream &os) const; 162 162 }; 163 163 164 164 inline void QcDelCoreTableau::AddScaledRow(unsigned destRow, unsigned srcRow, … … 242 242 } 243 243 244 244 #ifndef qcNoStream 245 inline ostream &operator<<(ostream &os, const QcDelCoreTableau &t)245 inline std::ostream &operator<<(std::ostream &os, const QcDelCoreTableau &t) 246 246 { 247 247 t.Print(os); 248 248 return os; -
qoca/KeyIterator.hh
1 1 #ifndef KeyIteratorHH 2 2 #define KeyIteratorHH 3 3 4 template <class Iterator, classKey>4 template <class Iterator, typename Key> 5 5 class KeyIterator 6 6 : public Iterator 7 7 { -
qoca/QcLinPolyTerm.hh
121 121 // Utility functions. // 122 122 //-----------------------------------------------------------------------// 123 123 public: 124 virtual void Print( ostream &os) const;124 virtual void Print(std::ostream &os) const; 125 125 126 126 private: 127 127 numT fCoeff; … … 159 159 } 160 160 #endif 161 161 162 inline void QcLinPolyTerm::Print( ostream &os) const162 inline void QcLinPolyTerm::Print(std::ostream &os) const 163 163 { 164 164 const char *name = fVariable.Name(); 165 165 … … 209 209 return QcLinPolyTerm( coeff, var); 210 210 } 211 211 212 inline ostream& operator<<(ostream &os, const QcLinPolyTerm &term)212 inline std::ostream& operator<<(std::ostream &os, const QcLinPolyTerm &term) 213 213 { 214 214 term.Print( os); 215 215 return os; -
qoca/QcCoreTableau.hh
217 217 //-----------------------------------------------------------------------// 218 218 // Utility functions. // 219 219 //-----------------------------------------------------------------------// 220 virtual void Print( ostream &os) const;220 virtual void Print(std::ostream &os) const; 221 221 222 222 protected: 223 223 QcQuasiRowColStateVector &fRowColState; … … 268 268 } 269 269 270 270 #ifndef qcNoStream 271 inline ostream &operator<<(ostream &os, const QcCoreTableau &t)271 inline std::ostream &operator<<(std::ostream &os, const QcCoreTableau &t) 272 272 { 273 273 t.Print(os); 274 274 return os; -
qoca/QcLinEqSolver.cc
33 33 #include "qoca/QcSparseMatrixRowIterator.hh" 34 34 #include "qoca/QcVariableIndexIterator.hh" 35 35 36 using namespace std; 37 36 38 #ifndef NDEBUG 37 39 void QcLinEqSolver::assertDeepInvar() const 38 40 { -
qoca/QcOrigRowState.hh
47 47 //-----------------------------------------------------------------------// 48 48 // Utility functions. // 49 49 //-----------------------------------------------------------------------// 50 virtual void Print( ostream &os);50 virtual void Print(std::ostream &os); 51 51 }; 52 52 53 53 inline QcOrigRowState::QcOrigRowState(int ci) … … 58 58 { 59 59 } 60 60 61 inline void QcOrigRowState::Print( ostream &os)61 inline void QcOrigRowState::Print(std::ostream &os) 62 62 { 63 63 os << "[RHS(" << fRHS << ")," 64 64 << "[MRowIndex(" << fMRowIndex << ")," -
qoca/QcSolver.cc
1 1 // Generated automatically from QcSolver.ch by /home/pmoulder/usr/local/bin/ch2xx. 2 2 #include "QcSolver.hh" 3 #line 1 "QcSolver.ch"4 3 // $Id: QcSolver.ch,v 1.21 2001/01/30 01:32:08 pmoulder Exp $ 5 4 6 5 //============================================================================// … … 27 26 // included with the above copyright notice. // 28 27 //============================================================================// 29 28 30 #include <vector .h>31 #include <algo .h>29 #include <vector> 30 #include <algorithm> 32 31 #include "qoca/QcConstraint.hh" 33 32 #include <qoca/QcFixedFloatRep.hh> 34 33 35 34 35 using namespace std; 36 36 37 37 38 38 39 40 39 //-----------------------------------------------------------------------// 41 40 // Constructor. // 42 41 //-----------------------------------------------------------------------// 43 #line 52 "QcSolver.ch"44 42 #if qcCheckInternalInvar 45 #line 59 "QcSolver.ch"46 43 void 47 44 QcSolver::assertDeepInvar() const 48 45 { … … 71 68 //-----------------------------------------------------------------------// 72 69 73 70 74 #line 96 "QcSolver.ch"75 71 void 76 72 QcSolver::addVar (QcFloatRep *v) 77 73 { … … 95 91 96 92 97 93 98 #line 125 "QcSolver.ch"99 94 bool 100 95 QcSolver::RemoveVar (QcFloat &v) 101 96 { … … 104 99 } 105 100 106 101 107 #line 156 "QcSolver.ch"108 102 //-----------------------------------------------------------------------// 109 103 // Enquiry functions for variables // 110 104 //-----------------------------------------------------------------------// 111 105 112 #line 169 "QcSolver.ch"113 106 bool QcSolver::IsFree (QcFloat const &v) const 114 107 { 115 108 UNUSED(v); … … 118 111 119 112 120 113 121 #line 194 "QcSolver.ch"122 114 bool 123 115 QcSolver::IsEditVar(QcFloat const &v) const 124 116 { … … 132 124 } 133 125 134 126 135 #line 214 "QcSolver.ch"136 127 /* ---------------------------------------------------------------------- 137 128 High Level Edit Variable Interface for use by solver clients. Edit 138 129 variables are set and unset with the following interface. The … … 154 145 } 155 146 156 147 157 #line 268 "QcSolver.ch"158 148 void 159 149 QcSolver::EndEdit() 160 150 { … … 167 157 } 168 158 169 159 170 #line 285 "QcSolver.ch"171 160 //-----------------------------------------------------------------------// 172 161 // Constraint management methods // 173 162 //-----------------------------------------------------------------------// 174 163 175 164 176 #line 313 "QcSolver.ch"177 165 #ifdef qcCheckPost /* swallow nyi unless compiled with qcCheckPost defined */ 178 166 bool QcSolver::swallow (QcSolver *other) 179 167 { … … 195 183 196 184 197 185 198 #line 383 "QcSolver.ch"199 186 void 200 187 QcSolver::AddWeightedConstraint(QcConstraint &c, numT weight) 201 188 { … … 257 244 258 245 259 246 260 #line 497 "QcSolver.ch"261 247 bool 262 248 QcSolver::EndAddConstraint() 263 249 { … … 279 265 280 266 281 267 282 #line 522 "QcSolver.ch"283 268 bool QcSolver::RemoveConstraint(QcConstraint &c) 284 269 { 285 270 UNUSED(c); … … 288 273 289 274 290 275 291 #line 546 "QcSolver.ch"292 276 //-----------------------------------------------------------------------// 293 277 // Constraint Solving methods // 294 278 //-----------------------------------------------------------------------// 295 279 296 #line 579 "QcSolver.ch"297 280 //-----------------------------------------------------------------------// 298 281 // Low Level Edit Variable Interface for use by solvers. These functions // 299 282 // manipulate the set of edit variables without any adjustment of the // … … 302 285 //-----------------------------------------------------------------------// 303 286 304 287 305 #line 599 "QcSolver.ch"306 288 void QcSolver::RemoveEditVar (QcFloat &v) 307 289 { 308 290 vector<QcFloat>::iterator it; … … 321 303 } 322 304 323 305 324 #line 625 "QcSolver.ch"325 306 //-----------------------------------------------------------------------// 326 307 // Utility functions. // 327 308 //-----------------------------------------------------------------------// … … 352 333 353 334 #if qcCheckPost 354 335 355 #line 671 "QcSolver.ch"356 336 void QcSolver::checkSatisfied() const 357 337 { 358 338 for (int i = checkedConstraints.size(); --i >= 0;) … … 363 343 } 364 344 365 345 366 #line 689 "QcSolver.ch"367 346 void 368 347 QcSolver::removeCheckedConstraint(QcConstraintRep *c) 369 348 { … … 398 377 } 399 378 400 379 401 #line 747 "QcSolver.ch"402 380 #endif 403 381 404 382 405 #line 769 "QcSolver.ch"406 383 #ifndef qcNoStream 407 #line 775 "QcSolver.ch"408 384 #endif 409 385 410 386 /* -
qoca/QcLinEqRowState.hh
53 53 //-----------------------------------------------------------------------// 54 54 // Utility functions. // 55 55 //-----------------------------------------------------------------------// 56 virtual void Print( ostream &os);56 virtual void Print(std::ostream &os); 57 57 58 58 int getCondition() const 59 59 { … … 108 108 fBasicVar = QcTableau::fInvalidVariableIndex; 109 109 } 110 110 111 inline void QcLinEqRowState::Print( ostream &os)111 inline void QcLinEqRowState::Print(std::ostream &os) 112 112 { 113 113 QcQuasiRowState::Print(os); 114 114 -
qoca/QcUtility.hh
60 60 //-----------------------------------------------------------------------// 61 61 62 62 static bool IsVaguelyZero(numT val) 63 { return fabs( val) < qcVaguelyNearEps; }63 { return fabs( val) < QcUtility::qcVaguelyNearEps; } 64 64 65 65 static bool IsNearZero(numT val) 66 { return fabs( val) < qcNearEps; }66 { return fabs( val) < QcUtility::qcNearEps; } 67 67 68 68 static bool IsZero(double val) 69 { return fabs( val) < qcEps; }69 { return fabs( val) < QcUtility::qcEps; } 70 70 71 71 static bool IsOne(double val) 72 { return IsZero( val - 1.0); }72 { return QcUtility::IsZero( val - 1.0); } 73 73 74 74 static bool IsNegative(numT val) 75 { return (val <= - qcEps); }75 { return (val <= -QcUtility::qcEps); } 76 76 77 77 static bool IsPositive(numT val) 78 { return (val >= qcEps); }78 { return (val >= QcUtility::qcEps); } 79 79 80 80 static double Zeroise(double val) 81 81 { 82 return ( IsZero( val)82 return (QcUtility::IsZero( val) 83 83 ? 0.0 84 84 : val); 85 85 } … … 87 87 #ifndef NDEBUG 88 88 static bool IsZeroised(double val) 89 89 { 90 return (val == 0 || ! IsZero( val));90 return (val == 0 || !QcUtility::IsZero( val)); 91 91 } 92 92 #endif 93 93 -
qoca/QcSolvedFormMatrix.hh
118 118 unsigned fColumns; 119 119 #endif 120 120 #ifdef qcRealTableauRHS 121 vector<numT> fRHS;121 std::vector<numT> fRHS; 122 122 #elif !defined(qcRealTableauCoeff) && qcCheckInternalPre 123 123 unsigned fRows; 124 124 #endif -
qoca/QcTableau.hh
166 166 //-----------------------------------------------------------------------// 167 167 // Utility functions. // 168 168 //-----------------------------------------------------------------------// 169 virtual void Print( ostream &os) const;170 virtual void TransitiveClosure( vector<unsigned int> &vars);169 virtual void Print(std::ostream &os) const; 170 virtual void TransitiveClosure(std::vector<unsigned int> &vars); 171 171 }; 172 172 173 173 inline QcTableau::QcTableau(QcBiMapNotifier &n) … … 192 192 return false; 193 193 } 194 194 195 inline void QcTableau::Print( ostream &os) const195 inline void QcTableau::Print(std::ostream &os) const 196 196 { 197 os << "Begin[Tableau]" << endl;197 os << "Begin[Tableau]" << std::endl; 198 198 fNotifier.Print(os); 199 os << "End[Tableau]" << endl;199 os << "End[Tableau]" << std::endl; 200 200 } 201 201 202 202 inline int QcTableau::RemoveEq(unsigned ci) … … 213 213 return false; 214 214 } 215 215 216 inline void QcTableau::TransitiveClosure( vector<unsigned int> &vars)216 inline void QcTableau::TransitiveClosure(std::vector<unsigned int> &vars) 217 217 { 218 218 UNUSED(vars); 219 219 throw QcWarning("Error: Should not call QcTableau::TransitiveClosure"); -
qoca/QcCompPivotTableau.hh
92 92 //------------------------------------------------------------------------// 93 93 // Utility functions. // 94 94 //------------------------------------------------------------------------// 95 virtual void Print( ostream &os) const;95 virtual void Print(std::ostream &os) const; 96 96 }; 97 97 98 98 inline QcCompPivotTableau::QcCompPivotTableau(int hintRows, int hintCols, -
qoca/QcDelLinEqTableau.cc
24 24 // included with the above copyright notice. // 25 25 //============================================================================// 26 26 27 #include < math.h>27 #include <cmath> 28 28 #include "qoca/QcDefines.hh" 29 29 #include "qoca/QcDelLinEqTableau.hh" 30 30 #ifdef qcDenseQuasiInverse -
qoca/QcVariableBiMap.cc
1 1 // Generated automatically from QcVariableBiMap.ch by /home/pmoulder/usr/local/bin/ch2xx. 2 2 #include "QcVariableBiMap.hh" 3 #line 1 "QcVariableBiMap.ch"4 3 5 #line 10 "QcVariableBiMap.ch"6 4 #include <stdio.h> 7 5 6 using namespace std; 8 7 9 10 8 #define super QcAliasedBiMap<QcNullableFloat, QcFloat, QcFloatRep> 11 9 12 10 … … 14 12 15 13 16 14 17 #line 28 "QcVariableBiMap.ch"18 15 #ifndef NDEBUG 19 16 20 17 void -
qoca/QcVariableBiMap.H
1 1 // Generated automatically from QcVariableBiMap.ch by /home/pmoulder/usr/local/bin/ch2xx. 2 2 #ifndef QcVariableBiMapDCL 3 3 #define QcVariableBiMapDCL 4 #line 1 "QcVariableBiMap.ch"5 4 6 5 #include <qoca/QcDefines.hh> 7 6 #include <qoca/QcAliasedBiMap.H> 8 7 #include <qoca/QcNullableFloat.hh> 9 8 10 9 11 #line 14 "QcVariableBiMap.ch"12 10 #define super QcAliasedBiMap<QcNullableFloat, QcFloat, QcFloatRep> 13 11 14 12 class QcVariableBiMap … … 27 25 28 26 void 29 27 assertInvar() const; 30 #line 40 "QcVariableBiMap.ch"31 28 void 32 29 assertDeepInvar() const; 33 #line 48 "QcVariableBiMap.ch"34 30 virtual void 35 31 vAssertDeepInvar() const; 36 #line 53 "QcVariableBiMap.ch"37 32 #endif 38 33 39 34 40 35 void 41 36 Update(QcFloat const &ident, int index); 42 #line 64 "QcVariableBiMap.ch"43 37 void 44 38 Update(QcFloatRep *ident, int index); 45 #line 72 "QcVariableBiMap.ch"46 39 //-----------------------------------------------------------------------// 47 40 // Query functions // 48 41 //-----------------------------------------------------------------------// 49 42 50 43 void 51 GetVariableSet(vector<QcFloat> &vars); 52 #line 100 "QcVariableBiMap.ch" 44 GetVariableSet(std::vector<QcFloat> &vars); 53 45 }; 54 46 55 47 -
qoca/QcLinInEqSystem.cc
38 38 #include "qoca/QcTableauColIterator.hh" 39 39 #include "qoca/QcDenseTableauRowIterator.hh" 40 40 41 using namespace std; 42 41 43 bool QcLinInEqSystem::AddConstraint(QcConstraint &c) 42 44 { 43 45 return doAddConstraint(c, -1); -
qoca/QcConstraintRep.hh
195 195 //-----------------------------------------------------------------------// 196 196 // Utility functions // 197 197 //-----------------------------------------------------------------------// 198 virtual void Print( ostream &os) const;198 virtual void Print(std::ostream &os) const; 199 199 200 200 protected: 201 201 static TId fNextValidId; … … 320 320 #endif 321 321 322 322 #ifndef qcNoStream 323 inline ostream &operator<<(ostream &os, const QcConstraintRep &r)323 inline std::ostream &operator<<(std::ostream &os, const QcConstraintRep &r) 324 324 { 325 325 r.Print(os); 326 326 return os; -
qoca/QcQuasiRowColStateVector.hh
2 2 #include "QcQuasiRowColStateVector.H" 3 3 #ifndef QcQuasiRowColStateVectorIFN 4 4 #define QcQuasiRowColStateVectorIFN 5 #line 1 "QcQuasiRowColStateVector.ch"6 5 // $Id: QcQuasiRowColStateVector.ch,v 1.4 2001/01/30 01:32:08 pmoulder Exp $ 7 6 8 7 //============================================================================// … … 49 48 } 50 49 51 50 52 #line 63 "QcQuasiRowColStateVector.ch"53 51 //-----------------------------------------------------------------------// 54 52 // Manipulation functions. // 55 53 //-----------------------------------------------------------------------// … … 69 67 70 68 #if 0 /* unused */ 71 69 72 #line 135 "QcQuasiRowColStateVector.ch"73 70 #endif /* unused */ 74 71 75 72 //-----------------------------------------------------------------------// 76 73 // Utility functions. // 77 74 //-----------------------------------------------------------------------// 78 75 inline void 79 QcQuasiRowColStateVector::Print( ostream &os)76 QcQuasiRowColStateVector::Print(std::ostream &os) 80 77 { 81 78 fRowState->Print(os); 82 79 fColState->Print(os); 83 80 } 84 81 85 82 86 #line 155 "QcQuasiRowColStateVector.ch"87 83 /* 88 84 Local Variables: 89 85 mode:c++ -
qoca/QcLinInEqColState.hh
94 94 //-----------------------------------------------------------------------// 95 95 // Utility functions. // 96 96 //-----------------------------------------------------------------------// 97 virtual void Print( ostream &os);97 virtual void Print(std::ostream &os); 98 98 99 99 public: 100 100 /** A constrained variable may only take non-negative values and hence if it … … 124 124 fPrevStruct = 0; 125 125 } 126 126 127 inline void QcLinInEqColState::Print( ostream &os)127 inline void QcLinInEqColState::Print(std::ostream &os) 128 128 { 129 129 QcLinEqColState::Print(os); 130 130 os << ",IsConst(" << fIsConstrained << ")," -
qoca/QcFloatRep.cc
1 1 // Generated automatically from QcFloatRep.ch by /home/pmoulder/usr/local/bin/ch2xx. 2 2 #include "QcFloatRep.hh" 3 #line 1 "QcFloatRep.ch"4 3 // $Id: QcFloatRep.ch,v 1.13 2001/01/10 05:01:51 pmoulder Exp $ 5 4 6 5 //============================================================================// … … 31 30 #include "qoca/QcUtility.hh" 32 31 33 32 34 #line 48 "QcFloatRep.ch" 33 using namespace std; 34 35 35 //-----------------------------------------------------------------------// 36 36 // Constructors // 37 37 //-----------------------------------------------------------------------// … … 58 58 } 59 59 60 60 61 #line 93 "QcFloatRep.ch"62 61 //-----------------------------------------------------------------------// 63 62 // Set and Get member functions // 64 63 //-----------------------------------------------------------------------// 65 64 66 #line 176 "QcFloatRep.ch"67 65 void QcFloatRep::SetWeight (numT w) 68 66 { 69 67 qcAssertPre( isQcFloatRep()); … … 83 81 } 84 82 85 83 86 #line 199 "QcFloatRep.ch"87 84 void 88 85 QcFloatRep::SuggestValue (numT dv) 89 86 { … … 92 89 } 93 90 94 91 95 #line 213 "QcFloatRep.ch"96 92 void QcFloatRep::SetName (char const *n) 97 93 { 98 94 qcAssertPre( isQcFloatRep()); … … 127 123 qcAssertPost (fName[len + qcMagic2Len] == '\0'); 128 124 } 129 125 130 #line 279 "QcFloatRep.ch"131 126 #if qcCheckInternalPre 132 127 void QcFloatRep::assertInvar() const 133 128 { … … 146 141 147 142 148 143 149 #line 299 "QcFloatRep.ch"150 144 bool QcFloatRep::FreeName() 151 145 { 152 146 qcAssertPre( isQcFloatRep()); … … 170 164 } 171 165 172 166 173 #line 352 "QcFloatRep.ch"174 167 //-----------------------------------------------------------------------// 175 168 // Utility functions. // 176 169 //-----------------------------------------------------------------------// … … 191 184 } 192 185 193 186 194 #line 414 "QcFloatRep.ch"195 187 QcFloatRep::TId QcFloatRep::fNextValidId = 1; 196 188 197 189 /* -
qoca/QcMatrix.hh
152 152 //-----------------------------------------------------------------------// 153 153 // Utility functions. // 154 154 //-----------------------------------------------------------------------// 155 virtual void Print( ostream &os) const;155 virtual void Print(std::ostream &os) const; 156 156 157 157 protected: 158 158 unsigned fAllocRows; // Used only by Reserve … … 166 166 { 167 167 } 168 168 169 inline void QcMatrix::Print( ostream &os) const169 inline void QcMatrix::Print(std::ostream &os) const 170 170 { 171 171 for (unsigned i = 0; i < fRows; i++) { 172 172 os << i << ":"; 173 173 for (unsigned j = 0; j < fColumns; j++) 174 174 os << "\t" << GetValue(i, j); 175 os << endl;175 os << std::endl; 176 176 } 177 177 } 178 178 179 179 #ifndef qcNoStream 180 inline ostream &operator<<(ostream &os, const QcMatrix &m)180 inline std::ostream &operator<<(std::ostream &os, const QcMatrix &m) 181 181 { 182 182 m.Print(os); 183 183 return os; -
qoca/QcFloat.hh
237 237 //-----------------------------------------------------------------------// 238 238 // Utility functions // 239 239 //-----------------------------------------------------------------------// 240 void Print( ostream &os) const240 void Print(std::ostream &os) const 241 241 { fRep->Print(os); } 242 242 243 243 protected: … … 363 363 } 364 364 365 365 #ifndef qcNoStream 366 inline ostream &operator<<(ostream &os, const QcFloat &cf)366 inline std::ostream &operator<<(std::ostream &os, const QcFloat &cf) 367 367 { 368 368 cf.Print(os); 369 369 return os; -
qoca/QcLinEqTableau.hh
27 27 #ifndef __QcLinEqTableauH 28 28 #define __QcLinEqTableauH 29 29 30 #include <deque .h>31 #include <vector .h>30 #include <deque> 31 #include <vector> 32 32 #include "qoca/QcTableau.hh" 33 33 #include "qoca/QcSparseCoeff.hh" 34 34 #include "qoca/QcDelCoreTableau.hh" … … 43 43 QcCoreTableau *fCoreTableau; 44 44 45 45 public: 46 deque<unsigned int> fPivotHints;46 std::deque<unsigned int> fPivotHints; 47 47 // During an eliminate operation, fPivotHints is erased and then 48 48 // the indices of parametric variables that do not have zero 49 49 // solved form coeffs are recorded. These are likely to be good … … 295 295 //-----------------------------------------------------------------------// 296 296 // Utility function. // 297 297 //-----------------------------------------------------------------------// 298 virtual void Print( ostream &os) const;298 virtual void Print(std::ostream &os) const; 299 299 300 300 protected: 301 301 //-----------------------------------------------------------------------// -
qoca/QcLinEqColState.hh
82 82 //-----------------------------------------------------------------------// 83 83 // Utility functions. // 84 84 //-----------------------------------------------------------------------// 85 virtual void Print( ostream &os);85 virtual void Print(std::ostream &os); 86 86 87 87 private: 88 88 numT fDesValue; // cache desired value of variable during solve … … 119 119 { 120 120 } 121 121 122 inline void QcLinEqColState::Print( ostream &os)122 inline void QcLinEqColState::Print(std::ostream &os) 123 123 { 124 124 QcQuasiColState::Print(os); 125 125 os << ",DV(" << fDesValue << ")," -
qoca/QcIneqSolverBase.H
1 1 // Generated automatically from QcIneqSolverBase.ch by /home/pmoulder/usr/local/bin/ch2xx. 2 2 #ifndef QcIneqSolverBaseDCL 3 3 #define QcIneqSolverBaseDCL 4 #line 1 "QcIneqSolverBase.ch"5 4 #include <qoca/QcSolver.H> 6 5 7 6 #include <qoca/QcDelLinInEqSystem.hh> … … 12 11 public: 13 12 14 13 inline 15 QcIneqSolverBase(); 16 #line 18 "QcIneqSolverBase.ch" 14 QcIneqSolverBase() 15 : QcSolver(), 16 fSystem() 17 { 18 ; 19 } 20 17 21 inline 18 QcIneqSolverBase(unsigned hintNumConstraints, unsigned hintNumVariables); 19 #line 26 "QcIneqSolverBase.ch" 22 QcIneqSolverBase(unsigned hintNumConstraints, unsigned hintNumVariables) 23 : QcSolver(), 24 fSystem( hintNumConstraints, hintNumVariables) 25 { 26 ; 27 } 28 29 20 30 virtual ~QcIneqSolverBase() 21 31 { 22 32 } … … 78 88 79 89 virtual bool 80 90 AddConstraint(QcConstraint &c); 81 #line 101 "QcIneqSolverBase.ch"82 91 virtual bool 83 92 AddConstraint(QcConstraint &c, QcFloat &hint); 84 #line 117 "QcIneqSolverBase.ch"85 93 virtual void 86 94 BeginAddConstraint() 87 95 { … … 98 106 99 107 virtual bool 100 108 ChangeConstraint(QcConstraint &oldc, numT rhs); 101 #line 143 "QcIneqSolverBase.ch"102 109 virtual bool 103 110 RemoveConstraint(QcConstraint &c); 104 #line 159 "QcIneqSolverBase.ch"105 111 virtual bool 106 112 Reset() 107 113 { -
qoca/QcLinPoly.cc
27 27 #include "qoca/QcDefines.hh" 28 28 #include "qoca/QcLinPoly.hh" 29 29 30 using namespace std; 31 30 32 QcLinPoly::QcLinPoly(const QcLinPoly& rhs) 31 33 { 32 34 size_t n = rhs.fTerms.size(); -
qoca/QcDefines.hh
173 173 ) 174 174 175 175 #ifndef qcNoStream 176 # include <iostream .h>176 # include <iostream> 177 177 #endif 178 178 179 179 /* TODO: Maybe use autoconf to detect this. (OTOH, I imagine that -
qoca/QcLinInEqSolver.cc
34 34 #include "qoca/QcStructVarIndexIterator.hh" 35 35 #include "qoca/QcSparseMatrixRowIterator.hh" 36 36 37 using namespace std; 38 37 39 void QcLinInEqSolver::AddDualCoeffs(QcLinPoly &lpoly, int p) 38 40 // Used by Generate constraints to add the dual variable 39 41 // coefficients to a linpoly corresponding to parameter p. -
qoca/QcCassSolver.hh
27 27 #ifndef __QcCassSolverH 28 28 #define __QcCassSolverH 29 29 30 #include <map .h>30 #include <map> 31 31 #include "qoca/QcDelLinInEqSystem.hh" 32 32 #include "qoca/QcCassConstraint.hh" 33 33 34 34 class QcCassSolver : public QcDelLinInEqSystem 35 35 { 36 36 protected: 37 typedef map<QcFloat, QcCassConstraint *> TStayMap;38 typedef vector<QcCassConstraint *> TEditMap;39 typedef vector<QcCassConstraint *> TStaySeqMap;37 typedef std::map<QcFloat, QcCassConstraint *> TStayMap; 38 typedef std::vector<QcCassConstraint *> TEditMap; 39 typedef std::vector<QcCassConstraint *> TStaySeqMap; 40 40 41 41 TStayMap fStayMap; 42 42 TEditMap fEditMap; … … 92 92 // Utility functions. // 93 93 //-----------------------------------------------------------------------// 94 94 virtual void Restart(); 95 virtual void Print( ostream &os) const;95 virtual void Print(std::ostream &os) const; 96 96 }; 97 97 98 98 inline QcCassSolver::QcCassSolver() -
layouter/ConstraintSolverLayouter.cpp
6 6 #include "ConstraintSolverLayouter.h" 7 7 8 8 #include <math.h> 9 #include <string .h>9 #include <string> 10 10 11 11 #include <LayoutUtils.h> 12 12 #include <Size.h>