Ticket #861: qoca-gcc4.diff

File qoca-gcc4.diff, 97.7 KB (added by eNGIMa, 18 years ago)

Diff of changes needed to compile qoca under GCC4 (Updated1)

  • qoca/QcLinInEqTableau.hh

     
    174174    //-----------------------------------------------------------------------//
    175175    // Utility functions.                                                    //
    176176    //-----------------------------------------------------------------------//
    177     virtual void Print(ostream &os) const
     177    virtual void Print(std::ostream &os) const
    178178        { QcLinEqTableau::Print(os); }
    179179
    180180protected:
     
    235235#ifndef NDEBUG
    236236      if (!QcUtility::IsZero (rhs))
    237237    {
    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";
    239239      //*(char *)0=0;
    240240      //return rhs;
    241241    }
  • qoca/QcSparseCoeff.hh

     
    2727#ifndef __QcSparseCoeffH
    2828#define __QcSparseCoeffH
    2929
    30 #include <iostream.h>
     30#include <iostream>
    3131
    3232class QcSparseCoeff
    3333{
     
    6262    //-----------------------------------------------------------------------//
    6363    // Utility function                                                      //
    6464    //-----------------------------------------------------------------------//
    65     void Print(ostream &os) const
     65    void Print(std::ostream &os) const
    6666        { os << "[" << fIndex << "," << fValue << "]"; }
    6767
    6868
  • qoca/QcLinInEqRowColStateVector.H

     
    11// Generated automatically from QcLinInEqRowColStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx.
    22#ifndef QcLinInEqRowColStateVectorDCL
    33#define QcLinInEqRowColStateVectorDCL
    4 #line 1 "QcLinInEqRowColStateVector.ch"
    54// $Id: QcLinInEqRowColStateVector.ch,v 1.1 2000/11/29 04:31:16 pmoulder Exp $
    65
    76//============================================================================//
     
    5352
    5453virtual void
    5554SwapColumns(unsigned v1, unsigned v2);
    56 #line 142 "QcLinInEqRowColStateVector.ch"
    5755public:
    5856    QcLinInEqColStateVector *fColState;
    5957
  • qoca/QcDelCoreTableau.cc

     
    3030#include "qoca/QcDelCoreTableau.hh"
    3131#include "qoca/QcRowAdaptor.hh"
    3232
     33using namespace std;
     34
    3335unsigned QcDelCoreTableau::AddRow(QcRowAdaptor &varCoeffs, numT rhs)
    3436{
    3537    unsigned r = 0;     // Row of fA, col of fM, int for original constraint
  • qoca/QcStateVector.hh

     
    2727#ifndef __QcStateVectorH
    2828#define __QcStateVectorH
    2929
    30 #include <iostream.h>
     30#include <iostream>
    3131#include "qoca/QcDefines.hh"
    3232#include "qoca/QcState.hh"
    3333
     
    8282    virtual void AddToList(QcState **start, QcState **finish) = 0;
    8383    virtual void RemoveFromList(QcState **start, QcState **finish) = 0;
    8484
    85     virtual void Print(ostream &os) const;
     85    virtual void Print(std::ostream &os) const;
    8686
    8787protected:
    8888  QcState * const * const getAllocEnd() const
     
    111111    delete [] fStates;
    112112}
    113113
    114 inline void QcStateVector::Print(ostream &os) const
     114inline void QcStateVector::Print(std::ostream &os) const
    115115{
    116116    for (unsigned i = 0; i < fSize; i++) {
    117117        fStates[i]->Print(os);
    118         os << endl;
     118        os << std::endl;
    119119    }
    120120}
    121121
  • qoca/QcLinInEqRowColStateVector.hh

     
    22#include "QcLinInEqRowColStateVector.H"
    33#ifndef QcLinInEqRowColStateVectorIFN
    44#define QcLinInEqRowColStateVectorIFN
    5 #line 1 "QcLinInEqRowColStateVector.ch"
    65// $Id: QcLinInEqRowColStateVector.ch,v 1.1 2000/11/29 04:31:16 pmoulder Exp $
    76
    87//============================================================================//
     
    3837
    3938
    4039
    41 #line 46 "QcLinInEqRowColStateVector.ch"
    4240//-----------------------------------------------------------------------//
    4341// Manipulation functions.                                               //
    4442//-----------------------------------------------------------------------//
    4543
    46 #line 147 "QcLinInEqRowColStateVector.ch"
    4744/*
    4845  Local Variables:
    4946  mode:c++
  • qoca/QcUnsortedListSet.hh

     
    11#ifndef __QcUnsortedListSetH
    22#define __QcUnsortedListSetH
    33
    4 #include <vector.h>
     4#include <vector>
    55
    66#if __GNUC__ >= 4
    77  template <class T, class Alloc = std::allocator<T> >
     
    1212{
    1313public:
    1414    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;
    1717    typedef value_type& reference;
    1818    typedef const value_type& const_reference;
    1919    typedef size_t size_type;
     
    3434    {
    3535    }
    3636
    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(); }
    3940
    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(); }
    4243
    4344    const_iterator abegin() const { return elements.begin(); }
    4445    const_iterator aend() const { return elements.end(); }
     
    8384
    8485       (The reason for using an instance variable is so that we can control
    8586       the interface.) */
    86     vector<T> elements;
     87    std::vector<T> elements;
    8788};
    8889#endif /* !__QcUnsortedListSetH */
  • qoca/QcCoreTableau.cc

     
    2828#include "qoca/QcCoreTableau.hh"
    2929#include "qoca/QcRowAdaptor.hh"
    3030
     31using namespace std;
     32
    3133unsigned QcCoreTableau::AddRow(QcRowAdaptor &varCoeffs, numT rhs)
    3234{
    3335    unsigned r = 0;     // Row of fA, col of fM, int for original constraint
  • qoca/QcOrigRowStateVector.hh

     
    22#include "QcOrigRowStateVector.H"
    33#ifndef QcOrigRowStateVectorIFN
    44#define QcOrigRowStateVectorIFN
    5 #line 1 "QcOrigRowStateVector.ch"
    65// $Id: QcOrigRowStateVector.ch,v 1.2 2000/12/06 05:32:56 pmoulder Exp $
    76// Originally written by Alan Finlay and Sitt Sen Chok
    87
     
    101100// Manipulation functions.                                               //
    102101//-----------------------------------------------------------------------//
    103102
    104 #line 152 "QcOrigRowStateVector.ch"
    105103#ifndef NDEBUG
    106104
    107 #line 165 "QcOrigRowStateVector.ch"
    108105#endif
    109106
    110107
    111108
    112109
    113110inline void
    114 QcOrigRowStateVector::Print(ostream &os) const
     111QcOrigRowStateVector::Print(std::ostream &os) const
    115112{
    116   os << endl << "Original Row State Vector:";
     113  os << std::endl << "Original Row State Vector:";
    117114  QcStateVector::Print( os);
    118115}
    119116
  • qoca/QcLinEqColStateVector.cc

     
    11// Generated automatically from QcLinEqColStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx.
    22#include "QcLinEqColStateVector.hh"
    3 #line 1 "QcLinEqColStateVector.ch"
    43// $Id: QcLinEqColStateVector.ch,v 1.2 2000/12/06 05:32:56 pmoulder Exp $
    54
    65//============================================================================//
     
    3635
    3736
    3837
    39 #line 49 "QcLinEqColStateVector.ch"
    4038#ifndef NDEBUG
    4139
    4240
     
    117115//-----------------------------------------------------------------------//
    118116
    119117
    120 #line 151 "QcLinEqColStateVector.ch"
    121118//-----------------------------------------------------------------------//
    122119// Set functions.                                                        //
    123120//-----------------------------------------------------------------------//
    124 #line 172 "QcLinEqColStateVector.ch"
    125121void
    126122QcLinEqColStateVector::SetBasic(unsigned i, bool b)
    127123{
     
    137133    }
    138134}
    139135
    140 #line 195 "QcLinEqColStateVector.ch"
    141136//-----------------------------------------------------------------------//
    142137// Manipulation functions.                                               //
    143138//-----------------------------------------------------------------------//
     
    166161}
    167162
    168163
    169 #line 254 "QcLinEqColStateVector.ch"
    170164void
    171165QcLinEqColStateVector::Alloc(QcState **start, QcState **finish)
    172166{
     
    227221
    228222
    229223void
    230 QcLinEqColStateVector::Print(ostream &os) const
     224QcLinEqColStateVector::Print(std::ostream &os) const
    231225{
    232226  QcQuasiColStateVector::Print(os);
    233   os << endl << "Basic variable list:" << endl;
     227  os << std::endl << "Basic variable list:" << std::endl;
    234228  QcLinEqColState *curr = fBasicHead.fNextCol;
    235229
    236230  while (curr != &fBasicHead)
    237231    {
    238232      curr->Print(os);
    239       os << endl;
     233      os << std::endl;
    240234      curr = curr->fNextCol;
    241235    }
    242236
    243   os << endl << "Param variable list:" << endl;
     237  os << std::endl << "Param variable list:" << std::endl;
    244238  curr = fParamHead.fNextCol;
    245239
    246240  while (curr != &fBasicHead)
    247241    {
    248242      curr->Print(os);
    249       os << endl;
     243      os << std::endl;
    250244      curr = curr->fNextCol;
    251245    }
    252246}
    253247
    254248
    255249
    256 #line 358 "QcLinEqColStateVector.ch"
    257250/*
    258251  Local Variables:
    259252  mode:c++
  • qoca/QcIneqSolverBase.hh

     
    22#include "QcIneqSolverBase.H"
    33#ifndef QcIneqSolverBaseIFN
    44#define QcIneqSolverBaseIFN
    5 #line 1 "QcIneqSolverBase.ch"
    65
    76#include <qoca/QcSolver.hh>
    87
     
    1211
    1312
    1413
    15 inline
     14/*inline
    1615QcIneqSolverBase::QcIneqSolverBase()
    1716  : QcSolver(),
    1817    fSystem()
    1918{
     19    ;
    2020}
    2121
    2222
     
    2525  : QcSolver(),
    2626    fSystem( hintNumConstraints, hintNumVariables)
    2727{
    28 }
     28    ;
     29}*/
    2930
    3031
    31 #line 80 "QcIneqSolverBase.ch"
    3232//-----------------------------------------------------------------------//
    3333// Constraint management methods                                         //
    3434//-----------------------------------------------------------------------//
    3535
    3636
    37 #line 173 "QcIneqSolverBase.ch"
    3837/*
    3938  Local Variables:
    4039  mode:c++
  • qoca/QcBiMapNotifier.hh

     
    7878    //-----------------------------------------------------------------------//
    7979    // Utility functions.                                                    //
    8080    //-----------------------------------------------------------------------//
    81     virtual void Print(ostream &os) const;
     81    virtual void Print(std::ostream &os) const;
    8282};
    8383
    8484#ifndef NDEBUG
     
    9494    fOCMap.EraseByIndex(ci);
    9595}
    9696
    97 inline void QcBiMapNotifier::Print(ostream &os) const
     97inline void QcBiMapNotifier::Print(std::ostream &os) const
    9898{
    99     os << "Variables:" << endl;
     99    os << "Variables:" << std::endl;
    100100    fVMap.Print(os);
    101     os << endl << "Constraints:" << endl;
     101    os << std::endl << "Constraints:" << std::endl;
    102102    fOCMap.Print(os);
    103     os << endl;
     103    os << std::endl;
    104104}
    105105
    106106inline void QcBiMapNotifier::Restart()
     
    110110}
    111111
    112112#ifndef qcNoStream
    113 inline ostream& operator<<(ostream& os, const QcBiMapNotifier &n)
     113inline std::ostream& operator<<(std::ostream& os, const QcBiMapNotifier &n)
    114114{
    115115    n.Print(os);
    116116    return os;
  • qoca/QcUtility.cc

     
     1#include <qoca/QcUtility.hh>
     2
     3/* Needed for GCC4, avoids undefined references */
     4
     5double const QcUtility::qcEps; //     = _QC_EPS;
     6double const QcUtility::qcNearEps; // = 9.313225746154785e-10;   // 2 ** -30
     7double const QcUtility::qcVaguelyNearEps; // = 9.5367431640625e-7; // 2 ** -20
     8double const QcUtility::qcMaxZeroVal; // = _QC_EPS * (1 - DBL_EPSILON / 2);
     9
  • qoca/QcCassConstraint.hh

     
    4444    //-----------------------------------------------------------------------//
    4545    // Utility functions                                                     //
    4646    //-----------------------------------------------------------------------//
    47     virtual void Print(ostream &os) const;
     47    virtual void Print(std::ostream &os) const;
    4848};
    4949
    5050inline QcCassConstraint::QcCassConstraint(QcFloat &v, QcConstraint &c,
     
    5353{
    5454}
    5555
    56 inline void QcCassConstraint::Print(ostream &os) const
     56inline void QcCassConstraint::Print(std::ostream &os) const
    5757{
    5858    os << "CassConstraint("
    5959        << fVariable << ","
  • qoca/QcFloatRep.H

     
    11// Generated automatically from QcFloatRep.ch by /home/pmoulder/usr/local/bin/ch2xx.
    22#ifndef QcFloatRepDCL
    33#define QcFloatRepDCL
    4 #line 1 "QcFloatRep.ch"
    54// $Id: QcFloatRep.ch,v 1.13 2001/01/10 05:01:51 pmoulder Exp $
    65
    76//============================================================================//
     
    5554
    5655QcFloatRep (const char *name, numT desval, numT sw, numT ew,
    5756        bool restricted);
    58 #line 74 "QcFloatRep.ch"
    5957#ifndef NDEBUG
    6058bool isQcFloatRep() const
    6159{ return fMagic == qcFloatMagic1; }
     
    149147
    150148
    151149inline char const *Name() const;
    152 #line 176 "QcFloatRep.ch"
    153150virtual void SetWeight (numT w);
    154 #line 183 "QcFloatRep.ch"
    155151virtual void SetValue (numT v);
    156 #line 194 "QcFloatRep.ch"
    157152/** Set the goal value of this variable to <tt>dv</tt>.
    158153
    159154    <p>Note that many solvers ignore SuggestValue on variables that are not edit
     
    161156**/
    162157void
    163158SuggestValue (numT dv);
    164 #line 206 "QcFloatRep.ch"
    165159/** Sets field <tt>fName</tt> to point to a heap-allocated string with a hidden
    166160    magic number field at the front.  (The magic number is qcFloatMagic2 without
    167161    the '\0' terminator.)
     
    170164    of lack of pointers.  The Java version consists of `fName = n'.)
    171165**/
    172166void SetName (char const *n);
    173 #line 248 "QcFloatRep.ch"
    174167inline void SetToGoal();
    175 #line 255 "QcFloatRep.ch"
    176168virtual void SetToEditWeight() = 0;
    177169
    178170virtual void SetToStayWeight() = 0;
     
    191183/** Called just before delete, to detect pointer corruption. */
    192184virtual void assertInvar() const;
    193185
    194 #line 296 "QcFloatRep.ch"
    195186/** Deallocates old name string checking magic2.
    196187    Returns success indicator.
    197188**/
    198189bool FreeName();
    199 #line 321 "QcFloatRep.ch"
    200190/** Set variables to defaults (including getting a new fId). */
    201191inline void Reset();
    202 #line 330 "QcFloatRep.ch"
    203192bool operator<(const QcFloatRep &other) const
    204193  // The comparisons are for when QcFloatRep is used
    205194  // as an identifier and compares instances not structure.
     
    227216//-----------------------------------------------------------------------//
    228217
    229218
    230 virtual void Print (ostream &os) const;
    231 #line 372 "QcFloatRep.ch"
     219virtual void Print (std::ostream &os) const;
    232220protected:
    233221    static TId fNextValidId;
    234222    static const TId fInvalidId = 0;
  • qoca/QcCompPivotTableau.cc

     
    3030#include "qoca/QcTableauColIterator.hh"
    3131#include "qoca/QcDenseTableauColIterator.hh"
    3232
     33using namespace std;
     34
    3335int QcCompPivotTableau::AddArtificial(numT coeff)
    3436{
    3537    int vi = IncreaseColumns();
  • qoca/QcDelLinInEqTableau.cc

     
    2929#include "qoca/QcSparseMatrixRowIterator.hh"
    3030#include "qoca/QcDenseMatrixColIterator.hh"
    3131
     32using namespace std;
     33
    3234int QcDelLinInEqTableau::AddGtEq(QcRowAdaptor &varCoeffs, numT rhs)
    3335{
    3436    int r = AddEq(varCoeffs, rhs);
  • qoca/QcQuasiRowState.hh

     
    5959  //-----------------------------------------------------------------------//
    6060  // Utililty functions.                                                   //
    6161  //-----------------------------------------------------------------------//
    62   virtual void Print(ostream &os);
     62  virtual void Print(std::ostream &os);
    6363
    6464public:
    6565  int fIndex;   // The property vector index of this record.
     
    8383    fPrevRow = 0;
    8484}
    8585
    86 inline void QcQuasiRowState::Print(ostream &os)
     86inline void QcQuasiRowState::Print(std::ostream &os)
    8787{
    8888  os << "Index(" << fIndex << "),"
    8989     << "ARowIndex(" << fARowIndex << "),"
  • qoca/QcConstraintRep.cc

     
    2727#include "qoca/QcDefines.hh"
    2828#include "qoca/QcConstraintRep.hh"
    2929
     30using namespace std;
     31
    3032QcConstraintRep::TId QcConstraintRep::fNextValidId = 1;
    3133const QcConstraintRep::TId QcConstraintRep::fInvalidId = 0;
    3234
  • qoca/QcQuasiRowColStateVector.cc

     
    11// Generated automatically from QcQuasiRowColStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx.
    22#include "QcQuasiRowColStateVector.hh"
    3 #line 1 "QcQuasiRowColStateVector.ch"
    43// $Id: QcQuasiRowColStateVector.ch,v 1.4 2001/01/30 01:32:08 pmoulder Exp $
    54
    65//============================================================================//
     
    3938//-----------------------------------------------------------------------//
    4039// Constructor.                                                          //
    4140//-----------------------------------------------------------------------//
    42 #line 63 "QcQuasiRowColStateVector.ch"
    4341//-----------------------------------------------------------------------//
    4442// Manipulation functions.                                               //
    4543//-----------------------------------------------------------------------//
    46 #line 80 "QcQuasiRowColStateVector.ch"
    4744#if 0 /* unused */
    4845
    4946void
     
    104101//-----------------------------------------------------------------------//
    105102// Utility functions.                                                    //
    106103//-----------------------------------------------------------------------//
    107 #line 155 "QcQuasiRowColStateVector.ch"
    108104/*
    109105  Local Variables:
    110106  mode:c++
  • qoca/QcSparseMatrix.hh

     
    2727#ifndef __QcSparseMatrixH
    2828#define __QcSparseMatrixH
    2929
    30 #include <vector.h>
     30#include <vector>
    3131#include "qoca/QcDefines.hh"
    3232#include "qoca/QcMatrix.hh"
    3333#include "qoca/QcSparseMatrixElement.hh"
  • qoca/QcDesireValueStore.hh

     
    5656  //-----------------------------------------------------------------------//
    5757  // Utility functions.                                                    //
    5858  //-----------------------------------------------------------------------//
    59   void Print(ostream &os) const;
     59  void Print(std::ostream &os) const;
    6060
    6161private:
    6262  QcFloatRep *fVariablePtr;
    6363  numT fDesValue;
    6464};
    6565
    66 inline void QcDesireValueStore::Print(ostream &os) const
     66inline void QcDesireValueStore::Print(std::ostream &os) const
    6767{
    6868  fVariablePtr->Print( os);
    6969  os << ":" << fDesValue;
  • qoca/QcBiMap.hh

     
    22#include "QcBiMap.H"
    33#ifndef QcBiMapIFN
    44#define QcBiMapIFN
    5 #line 1 "QcBiMap.ch"
    65
    7 #line 21 "QcBiMap.ch"
    86#define TMPL template<class AKey>
    97
    108
     
    1210
    1311
    1412
    15 #line 39 "QcBiMap.ch"
    1613#ifndef NDEBUG
    1714TMPL
    1815inline void
     
    2320      fIndexMap[ i].assertInvar();
    2421      if(fIndexMap[ i].isDead())
    2522    continue;
    26       TIdentifierMap::const_iterator f = fIdentifierMap.find(fIndexMap[i]);
     23      typename TIdentifierMap::const_iterator f = fIdentifierMap.find(fIndexMap[i]);
    2724      qcAssertInvar( f != fIdentifierMap.end());
    2825      qcAssertInvar( f->second == i);
    2926    }
    3027
    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++)
    3229    {
    3330      unsigned ix = ii->second;
    3431      qcAssertInvar( ix < fIndexMap.size());
     
    5249#endif
    5350
    5451
    55 #line 86 "QcBiMap.ch"
    5652    //-----------------------------------------------------------------------//
    5753    // BiMap manipulation functions.                                         //
    5854    //-----------------------------------------------------------------------//
    5955
    6056
    61 #line 93 "QcBiMap.ch"
    6257TMPL
    6358inline void
    6459QcBiMap<AKey>::EraseByIndex(int index)
     
    8479
    8580
    8681
    87 #line 123 "QcBiMap.ch"
    8882TMPL
    8983inline void
    9084QcBiMap<AKey>::SwapByIndex(int i1, int i2)
     
    9993  fIndexMap[ i1] = ident2;
    10094  fIndexMap[ i2] = ident1;
    10195
    102   QcBiMap<AKey>::TIdentifierMap::iterator it1 = fIdentifierMap.find( ident1);
     96  typename QcBiMap<AKey>::TIdentifierMap::iterator it1 = fIdentifierMap.find( ident1);
    10397  qcAssertPost( it1 != fIdentifierMap.end());
    10498  it1->second = i2;
    10599
    106   QcBiMap<AKey>::TIdentifierMap::iterator it2 = fIdentifierMap.find( ident2);
     100  typename QcBiMap<AKey>::TIdentifierMap::iterator it2 = fIdentifierMap.find( ident2);
    107101  qcAssertPost( it2 != fIdentifierMap.end());
    108102  it2->second = i1;
    109103}
    110104
    111105
    112106
    113 #line 156 "QcBiMap.ch"
    114107TMPL
    115108inline void
    116109QcBiMap<AKey>::Update(const AKey &ident, int index)
     
    127120  fIndexMap[ index] = ident;
    128121
    129122  // 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;
    132125  dbgPre(insResultT insResult =)
    133126    fIdentifierMap.insert (ins);
    134127
     
    144137//-----------------------------------------------------------------------//
    145138
    146139
    147 #line 209 "QcBiMap.ch"
    148140TMPL
    149141inline AKey &
    150142QcBiMap<AKey>::Identifier(int index)
     
    159151inline AKey &
    160152QcBiMap<AKey>::Identifier(char const *n)
    161153{
    162   QcBiMap<AKey>::TIdentifierMap::iterator iIt = fIdentifierMap.begin();
     154  typename QcBiMap<AKey>::TIdentifierMap::iterator iIt = fIdentifierMap.begin();
    163155
    164156  while(iIt != fIdentifierMap.end())
    165157    {
     
    174166
    175167
    176168
    177 #line 242 "QcBiMap.ch"
    178169TMPL
    179170inline int
    180171QcBiMap<AKey>::Index(AKey const &ident) const
    181172{
    182   QcBiMap<AKey>::TIdentifierMap::const_iterator iIt = fIdentifierMap.find( ident);
     173  typename QcBiMap<AKey>::TIdentifierMap::const_iterator iIt = fIdentifierMap.find( ident);
    183174  qcAssertPre( iIt != fIdentifierMap.end());
    184175  unsigned ix = iIt->second;
    185176  qcAssertPost( (ix < fIndexMap.size())
     
    189180
    190181
    191182
    192 #line 260 "QcBiMap.ch"
    193183TMPL
    194184inline int
    195185QcBiMap<AKey>::safeIndex(AKey const &ident) const
    196186{
    197   QcBiMap<AKey>::TIdentifierMap::const_iterator iIt = fIdentifierMap.find( ident);
     187  typename QcBiMap<AKey>::TIdentifierMap::const_iterator iIt = fIdentifierMap.find( ident);
    198188  if(iIt == fIdentifierMap.end())
    199189    return -1;
    200190  int ix = iIt->second;
     
    209199#ifndef qcNoStream
    210200TMPL
    211201inline void
    212 QcBiMap<AKey>::Print(ostream &os) const
     202QcBiMap<AKey>::Print(std::ostream &os) const
    213203{
    214   os << "Map start:" << endl;
     204  os << "Map start:" << std::endl;
    215205
    216206  for (unsigned int i = 0; i < fIndexMap.size(); i++)
    217     os << i << " -> " << fIndexMap[i] << endl;
     207    os << i << " -> " << fIndexMap[i] << std::endl;
    218208
    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;
    221211
    222212  for (itF = fIdentifierMap.begin(); itF != fIdentifierMap.end(); ++itF)
    223     os << (*itF).first << " -> " << (*itF).second << endl;
     213    os << (*itF).first << " -> " << (*itF).second << std::endl;
    224214
    225   os << "Map end." << endl;
     215  os << "Map end." << std::endl;
    226216}
    227217#endif /* !qcNoStream */
    228218
    229219
    230 #line 315 "QcBiMap.ch"
    231220#undef TMPL
    232221
    233222/*
  • qoca/QcLinEqTableau.cc

     
    3434#include "qoca/QcDenseTableauRowIterator.hh"
    3535#include "qoca/QcDenseTableauColIterator.hh"
    3636
     37using namespace std;
     38
    3739#ifndef NDEBUG
    3840void
    3941QcLinEqTableau::assertDeepInvar() const
  • qoca/QcDelLinEqSystem.hh

     
    6262    // inherited from Solver since variable weights have no effect on        //
    6363    // QcLinEqSystem::Resolve.                                               //
    6464    //-----------------------------------------------------------------------//
    65     virtual void TransitiveClosure(vector<unsigned int> &vars)
     65    virtual void TransitiveClosure(std::vector<unsigned int> &vars)
    6666        { fTableau.TransitiveClosure(vars); }
    6767
    6868    //-----------------------------------------------------------------------//
  • qoca/QcSolver.H

     
    11// Generated automatically from QcSolver.ch by /home/pmoulder/usr/local/bin/ch2xx.
    22#ifndef QcSolverDCL
    33#define QcSolverDCL
    4 #line 1 "QcSolver.ch"
    54// $Id: QcSolver.ch,v 1.21 2001/01/30 01:32:08 pmoulder Exp $
    65
    76//============================================================================//
     
    2827// included with the above copyright notice.                                  //
    2928//============================================================================//
    3029
    31 #include <vector.h>
    32 #include <algo.h>
     30#include <vector>
     31#include <algorithm>
    3332#include "qoca/QcConstraint.hh"
    3433
    3534
     
    4241// Constructor.                                                          //
    4342//-----------------------------------------------------------------------//
    4443inline QcSolver();
    45 #line 46 "QcSolver.ch"
    4644virtual ~QcSolver()
    4745{
    4846}
     
    5250#if qcCheckInternalInvar
    5351inline void
    5452assertInvar() const;
    55 #line 59 "QcSolver.ch"
    5653void
    5754assertDeepInvar() const;
    58 #line 74 "QcSolver.ch"
    5955virtual void
    6056vAssertDeepInvar() const;
    61 #line 79 "QcSolver.ch"
    6257#endif
    6358
    6459
     
    7873
    7974void
    8075addVar (QcFloatRep *v);
    81 #line 109 "QcSolver.ch"
    8276static void bad_call (char const *method) __attribute__ ((__noreturn__));
    8377
    84 #line 118 "QcSolver.ch"
    8578/** Removes variable from solver and returns true provided <tt>v</tt> is
    8679    free.  Does nothing and returns false if <tt>v</tt> is not free.
    8780
     
    9184**/
    9285virtual bool
    9386RemoveVar (QcFloat &v);
    94 #line 133 "QcSolver.ch"
    9587bool
    9688removeVar (QcFloatRep *v)
    9789{
     
    10698**/
    10799virtual inline void
    108100SuggestValue(QcFloat &v, numT desval);
    109 #line 152 "QcSolver.ch"
    110101/** Sets the desired value of all registered variables to their current
    111102    value.  Useful in some situations after a solve. */
    112103virtual void RestSolver() = 0;
     
    125116    the solver, a warning is issued if safety checks are enabled.
    126117**/
    127118virtual bool IsFree (QcFloat const &v) const;
    128 #line 176 "QcSolver.ch"
    129119/** Indicates if a variable used by the tableau is basic.  It is an
    130120    error to call <tt>IsBasic</tt> for a variable not used by the the
    131121    solver; a warning is issued in this case if safety checks are
     
    146136**/
    147137bool
    148138IsEditVar(QcFloat const &v) const;
    149 #line 207 "QcSolver.ch"
    150139bool isEditVar (QcFloatRep const *v) const
    151140{
    152141  QcFloat v1(v);
     
    169158
    170159virtual void
    171160AddEditVar(QcFloat &v);
    172 #line 235 "QcSolver.ch"
    173161void addEditVar (QcFloatRep *v)
    174162{
    175163  QcFloat v1 (v);
     
    205193
    206194virtual void
    207195EndEdit();
    208 #line 280 "QcSolver.ch"
    209196/** Synonym of <tt>EndEdit</tt>. */
    210197void endEdit()
    211198{ EndEdit(); }
     
    219206    inconsistant since the last call to <tt>ClearInconsistant</tt>.
    220207    The handles are stored in the order in which they were encountered.
    221208**/
    222 inline vector<QcConstraint> const &Inconsistant() const;
    223 #line 299 "QcSolver.ch"
     209inline std::vector<QcConstraint> const &Inconsistant() const;
    224210virtual void ClearInconsistant()
    225211{ fInconsistant.resize(0); }
    226212
     
    235221**/
    236222bool swallow (QcSolver *other);
    237223
    238 #line 333 "QcSolver.ch"
    239224/** If <tt>c</tt> is consistent with the other constraints in this
    240225    solver, then add <tt>c</tt> to this solver and return
    241226    <tt>true</tt>; otherwise simply return <tt>false</tt>.  The
     
    288273
    289274void
    290275AddWeightedConstraint(QcConstraint &c, numT weight);
    291 #line 443 "QcSolver.ch"
    292276/** Marks the beginning of a batch of AddConstraint operation.
    293277
    294278    @precondition <tt>!inBatch()</tt>
    295279**/
    296280inline virtual void
    297281BeginAddConstraint();
    298 #line 457 "QcSolver.ch"
    299282/** Returns <tt>true</tt> iff batch constraint mode is active, i.e.&nbsp;there
    300283    has been a call to <tt>BeginAddConstraint</tt> not followed by an
    301284    <tt>EndAddConstraint</tt> call.
    302285**/
    303286inline bool
    304287inBatch();
    305 #line 467 "QcSolver.ch"
    306288inline bool
    307289ChangeRHS (QcConstraint &c, numT rhs);
    308 #line 473 "QcSolver.ch"
    309290inline bool
    310291changeRHS (QcConstraintRep *c, numT rhs);
    311 #line 479 "QcSolver.ch"
    312292/** Change the rhs of a constraint. */
    313293virtual bool ChangeConstraint(QcConstraint &c, numT rhs) = 0;
    314294
     
    329309
    330310virtual bool
    331311EndAddConstraint();
    332 #line 517 "QcSolver.ch"
    333312/** If <tt>c</tt> is in this solver, then remove it and return
    334313    <tt>true</tt>.  Does not modify the value of any variable in
    335314    <tt>c</tt>.  Returns false if the constraint is not present and
    336315    also issues a warning if safety checks are enabled.
    337316**/
    338317virtual bool RemoveConstraint(QcConstraint &c);
    339 #line 530 "QcSolver.ch"
    340318bool removeConstraint (QcConstraintRep *c)
    341319{
    342320  QcConstraint c1 (c);
     
    396374/** Add <tt>v</tt> to fEditVars. */
    397375inline void
    398376RegisterEditVar(QcFloat &v);
    399 #line 597 "QcSolver.ch"
    400377/** Remove <tt>v</tt> from <tt>fEditVars</tt>. */
    401378
    402379virtual void RemoveEditVar (QcFloat &v);
    403 #line 617 "QcSolver.ch"
    404380virtual void ClearEditVars()                // make fEditVars empty.
    405381{
    406382  fEditVars.resize(0);
     
    414390//-----------------------------------------------------------------------//
    415391
    416392
    417 virtual void Print (ostream &os) const;
    418 #line 642 "QcSolver.ch"
     393virtual void Print (std::ostream &os) const;
    419394/** Erase everything ready to start afresh. */
    420395
    421396virtual void
    422397Restart();
    423 #line 653 "QcSolver.ch"
    424398#if qcCheckPost
    425399public:
    426400inline bool
    427401hasConstraint(QcConstraintRep const *c) const;
    428 #line 664 "QcSolver.ch"
    429402inline bool
    430403hasConstraint(QcConstraint const &c) const;
    431 #line 671 "QcSolver.ch"
    432404void checkSatisfied() const;
    433 #line 680 "QcSolver.ch"
    434405protected:
    435406inline void
    436407addCheckedConstraint(QcConstraintRep *c);
    437 #line 689 "QcSolver.ch"
    438408void
    439409removeCheckedConstraint(QcConstraintRep *c);
    440 #line 723 "QcSolver.ch"
    441410inline void
    442411changeCheckedConstraint(QcConstraintRep *oldc, numT rhs);
    443 #line 729 "QcSolver.ch"
    444 inline vector<QcConstraintRep *>::const_iterator
     412inline std::vector<QcConstraintRep *>::const_iterator
    445413checkedConstraints_abegin() const;
    446 #line 735 "QcSolver.ch"
    447 inline vector<QcConstraintRep *>::const_iterator
     414inline std::vector<QcConstraintRep *>::const_iterator
    448415checkedConstraints_aend() const;
    449 #line 741 "QcSolver.ch"
    450 inline vector<QcConstraintRep *>::size_type
     416inline std::vector<QcConstraintRep *>::size_type
    451417checkedConstraints_size() const;
    452 #line 747 "QcSolver.ch"
    453418#endif
    454419
    455420
    456421protected:
    457   vector<QcConstraint> fInconsistant;   // Records inconsistant constraints
    458   vector<QcFloat> fEditVars;        // Used for Edit/Resolve
     422  std::vector<QcConstraint> fInconsistant;  // Records inconsistant constraints
     423  std::vector<QcFloat> fEditVars;       // Used for Edit/Resolve
    459424  bool fEditVarsSetup;          // Used for Edit/Resolve
    460425  bool fAutoSolve;
    461426  bool fBatchAddConst;
    462427  bool fBatchAddConstFail;
    463   vector<QcConstraint> fBatchConstraints;
     428  std::vector<QcConstraint> fBatchConstraints;
    464429
    465430#if qcCheckPost
    466431private:
    467   vector<QcConstraintRep *> checkedConstraints;
     432  std::vector<QcConstraintRep *> checkedConstraints;
    468433#endif
    469434
    470435
     
    473438
    474439
    475440#ifndef qcNoStream
    476 inline ostream &operator<< (ostream &os, const QcSolver &s);
    477 #line 775 "QcSolver.ch"
     441inline std::ostream &operator<< (std::ostream &os, const QcSolver &s);
    478442#endif
    479443
    480444/*
  • qoca/QcNullableElement.hh

     
    160160
    161161#ifndef qcNoStream
    162162template <class ElementRep, class ElementRef>
    163 inline ostream &operator<<(ostream &os, QcNullableElement<ElementRep, ElementRef> const &cf)
     163inline std::ostream &operator<<(std::ostream &os, QcNullableElement<ElementRep, ElementRef> const &cf)
    164164{
    165165    reinterpret_cast<ElementRef const &>(cf).Print(os);
    166166    return os;
  • qoca/QcCassSolver.cc

     
    2929#include "qoca/QcStructVarIndexIterator.hh"
    3030#include "qoca/QcVariableIndexIterator.hh"
    3131
     32using namespace std;
     33
    3234QcCassSolver::~QcCassSolver()
    3335{
    3436    // Deallocate memory allocated to Cassowary stay constraints.
  • qoca/QcLinEqSystem.hh

     
    2727#ifndef __QcLinEqSystemH
    2828#define __QcLinEqSystemH
    2929
    30 #include <vector.h>
     30#include <vector>
    3131#include "qoca/QcSolver.hh"
    3232#include "qoca/QcLinEqTableau.hh"
    3333#include "qoca/QcConstraint.hh"
     
    4141    typedef QcVariableBiMap::const_identifier_iterator const_var_iterator;
    4242
    4343protected:
    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 Resolve
    48     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;
    4949        // fDepVarCoeffs is a partial map from dependant variable index
    5050        // to a vector (used as a list) of sparse coefficients.
    5151
     
    167167    //-----------------------------------------------------------------------//
    168168    // Utility functions.                                                    //
    169169    //-----------------------------------------------------------------------//
    170     virtual void Print(ostream &os) const;
     170    virtual void Print(std::ostream &os) const;
    171171    virtual void Restart();
    172172        // Erase everything ready to start afresh.
    173173
    174174    QcFloat &GetVariable(const char *n) const
    175175        { return fVBiMap.Identifier(n); }
    176176
    177     void GetVariableSet(vector<QcFloat> &vars) const
     177    void GetVariableSet(std::vector<QcFloat> &vars) const
    178178        { fVBiMap.GetVariableSet(vars); }
    179179
    180180    const_var_iterator getVariables_begin() const
     
    235235    return true;
    236236}
    237237
    238 inline void QcLinEqSystem::Print(ostream &os) const
     238inline void QcLinEqSystem::Print(std::ostream &os) const
    239239{
    240240    QcSolver::Print(os);
    241241    fNotifier.Print(os);
    242     os << endl;
     242    os << std::endl;
    243243    fTableau.Print(os);
    244244}
    245245
  • qoca/QcBiMap.H

     
    11// Generated automatically from QcBiMap.ch by /home/pmoulder/usr/local/bin/ch2xx.
    22#ifndef QcBiMapDCL
    33#define QcBiMapDCL
    4 #line 1 "QcBiMap.ch"
    54
    6 #include <iostream.h>
    7 #include <map.h>
    8 #include <vector.h>
     5#include <iostream>
     6#include <map>
     7#include <vector>
    98#include "qoca/QcDefines.hh"
    109#include "qoca/KeyIterator.hh"
    1110
     
    2423
    2524
    2625
    27 template<class AKey>
     26template<typename AKey>
    2827class QcBiMap
    2928{
    3029
     
    4443
    4544inline void
    4645assertInvar() const;
    47 #line 63 "QcBiMap.ch"
    4846inline void
    4947assertDeepInvar() const;
    50 #line 70 "QcBiMap.ch"
    5148virtual inline void
    5249vAssertDeepInvar() const;
    53 #line 75 "QcBiMap.ch"
    5450#endif
    5551
    5652
    5753protected:
    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;
    6056
    6157public:
    62     typedef KeyIterator<TIdentifierMap::const_iterator, AKey> const_identifier_iterator;
     58    typedef KeyIterator<typename TIdentifierMap::const_iterator, AKey> const_identifier_iterator;
    6359
    6460
    6561    //-----------------------------------------------------------------------//
     
    7268
    7369inline void
    7470EraseByIndex(int index);
    75 #line 107 "QcBiMap.ch"
    7671/** Erase everything ready to start afresh. */
    7772
    7873inline void
    7974Restart();
    80 #line 117 "QcBiMap.ch"
    8175/** Swap the mappings around so that {ix1 &harr; id1, ix2 &harr; id2}
    8276    becomes {ix1 &harr; id2, ix2 &harr; id1}.
    8377
     
    8781
    8882inline void
    8983SwapByIndex(int i1, int i2);
    90 #line 147 "QcBiMap.ch"
    9184/** Insert the mapping <tt>ident</tt> &harr; <tt>index</tt> into this
    9285    bimap.
    9386
     
    10093
    10194inline void
    10295Update(const AKey &ident, int index);
    103 #line 184 "QcBiMap.ch"
    10496//-----------------------------------------------------------------------//
    10597// Query functions.                                                      //
    10698//-----------------------------------------------------------------------//
     
    117109  const_identifier_iterator
    118110  getIdentifiers_begin() const
    119111  {
    120     TIdentifierMap::const_iterator i = fIdentifierMap.begin();
     112    typename TIdentifierMap::const_iterator i = fIdentifierMap.begin();
    121113    return const_identifier_iterator (i);
    122114  }
    123115
     
    129121
    130122inline AKey &
    131123Identifier(int index);
    132 #line 220 "QcBiMap.ch"
    133124inline AKey &
    134125Identifier(char const *n);
    135 #line 237 "QcBiMap.ch"
    136126/** Return the index associated with <tt>ident</tt>.
    137127
    138128    @precondition <tt>IdentifierPresent(ident)</tt>
     
    141131
    142132inline int
    143133Index(AKey const &ident) const;
    144 #line 255 "QcBiMap.ch"
    145134/** Return the index associated with <tt>ident</tt>,
    146135    or -1 if <tt>ident</tt> is not present.
    147136
     
    150139
    151140inline int
    152141safeIndex(AKey const &ident) const;
    153 #line 273 "QcBiMap.ch"
    154142//-----------------------------------------------------------------------//
    155143// Utility functions.                                                    //
    156144//-----------------------------------------------------------------------//
    157145#ifndef qcNoStream
    158146
    159147inline void
    160 Print(ostream &os) const;
    161 #line 294 "QcBiMap.ch"
     148Print(std::ostream &os) const;
    162149#endif /* !qcNoStream */
    163150
    164151
     
    172159
    173160#ifndef qcNoStream
    174161template<class AKey>
    175 ostream &operator<<(ostream &os, const QcBiMap<AKey> &bm)
     162std::ostream &operator<<(std::ostream &os, const QcBiMap<AKey> &bm)
    176163{
    177164    bm.Print(os);
    178165    return os;
  • qoca/QcQuasiColState.hh

     
    4949    //-----------------------------------------------------------------------//
    5050    // Utililty functions.                                                   //
    5151    //-----------------------------------------------------------------------//
    52     virtual void Print(ostream &os)
     52    virtual void Print(std::ostream &os)
    5353        { os << "Index(" << fIndex << ")"; }
    5454
    5555public:
  • qoca/QcLinInEqTableau.cc

     
    2525//============================================================================//
    2626
    2727#include <math.h>
    28 #include <vector.h>
     28#include <vector>
    2929#include "qoca/QcDefines.hh"
    3030#include "qoca/QcLinInEqTableau.hh"
    3131#include "qoca/QcConstraintIndexIterator.hh"
     
    3434#include "qoca/QcVariableIndexIterator.hh"
    3535#include "qoca/QcTableauRowIterator.hh"
    3636
     37using namespace std;
     38
    3739int QcLinInEqTableau::AddArtificial(numT coeff)
    3840{
    3941    unsigned vi = IncreaseColumns();
  • qoca/QcQuasiRowStateVector.cc

     
    11// Generated automatically from QcQuasiRowStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx.
    22#include "QcQuasiRowStateVector.hh"
    3 #line 1 "QcQuasiRowStateVector.ch"
    43// $Id: QcQuasiRowStateVector.ch,v 1.1 2000/11/29 01:49:41 pmoulder Exp $
    54
    65//============================================================================//
     
    3029#include "qoca/QcStateVector.hh"
    3130#include "qoca/QcQuasiRowState.hh"
    3231
     32using namespace std;
    3333
    3434
    3535
    3636
    3737
    38 
    39 #line 78 "QcQuasiRowStateVector.ch"
    4038void
    4139QcQuasiRowStateVector::SetMRowDeleted(unsigned i, bool d)
    4240{
     
    150148
    151149
    152150
    153 #line 260 "QcQuasiRowStateVector.ch"
    154151//-----------------------------------------------------------------------//
    155152// Utility functions.                                                    //
    156153//-----------------------------------------------------------------------//
    157154
    158155
    159156void
    160 QcQuasiRowStateVector::Print(ostream &os) const
     157QcQuasiRowStateVector::Print(std::ostream &os) const
    161158{
    162   os << endl << "Row State Vector:";
     159  os << std::endl << "Row State Vector:";
    163160  QcStateVector::Print(os);
    164   os << endl << "Row List:";
     161  os << std::endl << "Row List:";
    165162  QcQuasiRowState *curr = fRowList;
    166163
    167164  while (curr != 0)
    168165    {
    169166      curr->Print(os);
    170       os << endl;
     167      os << std::endl;
    171168      curr = curr->fNextRow;
    172169    }
    173170}
    174171
    175172
    176 #line 299 "QcQuasiRowStateVector.ch"
    177173/*
    178174  Local Variables:
    179175  mode:c++
  • qoca/Jamfile

     
    4747    QcSparseMatrix.cc
    4848    QcVarStow.cc
    4949    QcVariableBiMap.cc
     50    QcUtility.cc
    5051    :
    5152    $(TARGET_LIBSTDC++)
    5253;
  • qoca/QcQuasiRowStateVector.H

     
    11// Generated automatically from QcQuasiRowStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx.
    22#ifndef QcQuasiRowStateVectorDCL
    33#define QcQuasiRowStateVectorDCL
    4 #line 1 "QcQuasiRowStateVector.ch"
    54// $Id: QcQuasiRowStateVector.ch,v 1.1 2000/11/29 01:49:41 pmoulder Exp $
    65
    76//============================================================================//
     
    8180
    8281void
    8382SetMRowDeleted(unsigned i, bool d);
    84 #line 94 "QcQuasiRowStateVector.ch"
    8583//-----------------------------------------------------------------------//
    8684// Manipulation functions.                                               //
    8785//-----------------------------------------------------------------------//
     
    9088
    9189virtual void
    9290AddToList(QcState **start, QcState **finish);
    93 #line 120 "QcQuasiRowStateVector.ch"
    9491#ifndef NDEBUG
    9592public:
    9693
    9794
    9895void
    9996assertLinkageInvar() const;
    100 #line 155 "QcQuasiRowStateVector.ch"
    10197protected:
    10298
    10399
    104100virtual void
    105101virtualAssertLinkageInvar() const;
    106 #line 163 "QcQuasiRowStateVector.ch"
    107102#endif
    108103
    109104public:
     
    111106
    112107virtual void
    113108FixLinkage();
    114 #line 189 "QcQuasiRowStateVector.ch"
    115109private:
    116110
    117111inline void
    118112LinkRow(unsigned index);
    119 #line 199 "QcQuasiRowStateVector.ch"
    120113inline void
    121114LinkRow(QcQuasiRowState *me);
    122 #line 216 "QcQuasiRowStateVector.ch"
    123115inline void
    124116UnlinkRow(unsigned index);
    125 #line 225 "QcQuasiRowStateVector.ch"
    126117inline void
    127118UnlinkRow(QcQuasiRowState *me);
    128 #line 244 "QcQuasiRowStateVector.ch"
    129119protected:
    130120inline void
    131121Restart(unsigned i);
    132 #line 260 "QcQuasiRowStateVector.ch"
    133122//-----------------------------------------------------------------------//
    134123// Utility functions.                                                    //
    135124//-----------------------------------------------------------------------//
    136125public:
    137126
    138127virtual void
    139 Print(ostream &os) const;
    140 #line 281 "QcQuasiRowStateVector.ch"
     128Print(std::ostream &os) const;
    141129private:
    142130inline QcQuasiRowState *
    143131getState( unsigned i) const;
    144 #line 293 "QcQuasiRowStateVector.ch"
    145132public:
    146133    QcQuasiRowState *fRowList;  // head of undeleted fM rows linked list
    147134
  • qoca/QcLinInEqRowColStateVector.cc

     
    11// Generated automatically from QcLinInEqRowColStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx.
    22#include "QcLinInEqRowColStateVector.hh"
    3 #line 1 "QcLinInEqRowColStateVector.ch"
    43// $Id: QcLinInEqRowColStateVector.ch,v 1.1 2000/11/29 04:31:16 pmoulder Exp $
    54
    65//============================================================================//
     
    3332
    3433
    3534
     35using namespace std;
    3636
    3737
    38 
    39 #line 46 "QcLinInEqRowColStateVector.ch"
    4038//-----------------------------------------------------------------------//
    4139// Manipulation functions.                                               //
    4240//-----------------------------------------------------------------------//
     
    133131}
    134132
    135133
    136 #line 147 "QcLinInEqRowColStateVector.ch"
    137134/*
    138135  Local Variables:
    139136  mode:c++
  • qoca/QcOrigRowStateVector.cc

     
    11// Generated automatically from QcOrigRowStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx.
    22#include "QcOrigRowStateVector.hh"
    3 #line 1 "QcOrigRowStateVector.ch"
    43// $Id: QcOrigRowStateVector.ch,v 1.2 2000/12/06 05:32:56 pmoulder Exp $
    54// Originally written by Alan Finlay and Sitt Sen Chok
    65
     
    3332#include "qoca/QcOrigRowState.hh"
    3433
    3534
     35using namespace std;
    3636
    3737
    3838
    39 
    40 #line 44 "QcOrigRowStateVector.ch"
    4139//-----------------------------------------------------------------------//
    4240// Query functions.                                                      //
    4341//-----------------------------------------------------------------------//
    4442
    45 #line 71 "QcOrigRowStateVector.ch"
    4643//-----------------------------------------------------------------------//
    4744// Set* functions.
    4845//-----------------------------------------------------------------------//
    49 #line 95 "QcOrigRowStateVector.ch"
    5046//-----------------------------------------------------------------------//
    5147// Manipulation functions.                                               //
    5248//-----------------------------------------------------------------------//
     
    113109    {
    114110      QcOrigRowState const *state = CAST(QcOrigRowState const *, *i);
    115111      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);
    117114      assert( !state->fARowDeleted);
    118115    }
    119116}
     
    121118
    122119
    123120
    124 #line 191 "QcOrigRowStateVector.ch"
    125121/*
    126122  Local Variables:
    127123  mode:c++
  • qoca/QcLinEqSolver.hh

     
    4040    #else
    4141    QcDelLinEqSystem fSubSystem;
    4242    #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;
    4747
    4848    QcVariableBiMap &fVBiMap;
    4949    const QcBiMapNotifier &fNotifier;
     
    136136    //-----------------------------------------------------------------------//
    137137    void GenerateKT1(QcFloat &p, QcSparseMatrix &ccache
    138138#ifndef qcRealTableauRHS
    139              , vector<numT> &crhs
     139             , std::vector<numT> &crhs
    140140#endif
    141141            );
    142142        // Generate the constraint df'/dp == 0
     
    148148
    149149    void GenerateKT2(QcFloat &p, QcSparseMatrix &ccache
    150150#ifndef qcRealTableauRHS
    151              , vector<numT> &crhs
     151             , std::vector<numT> &crhs
    152152#endif
    153153            );
    154154        // Generate the constraint df'/dp == 0 where parameters of interest
     
    169169    QcFloat GetVariable(const char *n)
    170170        { return fSystem.GetVariable(n); }
    171171
    172     void GetVariableSet(vector<QcFloat> &vars)
     172    void GetVariableSet(std::vector<QcFloat> &vars)
    173173        { fSystem.GetVariableSet(vars); }
    174174
    175     virtual void QcLinEqSolver::Print(ostream &os) const;
     175    virtual void QcLinEqSolver::Print(std::ostream &os) const;
    176176};
    177177
    178178inline QcLinEqSolver::QcLinEqSolver()
  • qoca/QcIneqSolverBase.cc

     
    11// Generated automatically from QcIneqSolverBase.ch by /home/pmoulder/usr/local/bin/ch2xx.
    22#include "QcIneqSolverBase.hh"
    3 #line 1 "QcIneqSolverBase.ch"
    43
    54#include <qoca/QcSolver.hh>
    65
     
    109
    1110
    1211
    13 #line 80 "QcIneqSolverBase.ch"
    1412//-----------------------------------------------------------------------//
    1513// Constraint management methods                                         //
    1614//-----------------------------------------------------------------------//
     
    4846}
    4947
    5048
    51 #line 131 "QcIneqSolverBase.ch"
    5249bool
    5350QcIneqSolverBase::ChangeConstraint(QcConstraint &oldc, numT rhs)
    5451{
     
    7774}
    7875
    7976
    80 #line 173 "QcIneqSolverBase.ch"
    8177/*
    8278  Local Variables:
    8379  mode:c++
  • qoca/QcSolver.hh

     
    22#include "QcSolver.H"
    33#ifndef QcSolverIFN
    44#define QcSolverIFN
    5 #line 1 "QcSolver.ch"
    65// $Id: QcSolver.ch,v 1.21 2001/01/30 01:32:08 pmoulder Exp $
    76
    87//============================================================================//
     
    2928// included with the above copyright notice.                                  //
    3029//============================================================================//
    3130
    32 #include <vector.h>
    33 #include <algo.h>
     31#include <vector>
     32#include <algorithm>
    3433#include "qoca/QcConstraint.hh"
    3534
    3635
     
    4847}
    4948
    5049
    51 #line 52 "QcSolver.ch"
    5250#if qcCheckInternalInvar
    5351inline void
    5452QcSolver::assertInvar() const
     
    5654}
    5755
    5856
    59 #line 79 "QcSolver.ch"
    6057#endif
    6158
    6259
     
    6562//-----------------------------------------------------------------------//
    6663
    6764
    68 #line 145 "QcSolver.ch"
    6965inline void
    7066QcSolver::SuggestValue(QcFloat &v, numT desval)
    7167{
     
    8177// Enquiry functions for variables                                       //
    8278//-----------------------------------------------------------------------//
    8379
    84 #line 214 "QcSolver.ch"
    8580/* ----------------------------------------------------------------------
    8681   High Level Edit Variable Interface for use by solver clients. Edit
    8782   variables are set and unset with the following interface. The
     
    9590
    9691
    9792
    98 #line 285 "QcSolver.ch"
    9993//-----------------------------------------------------------------------//
    10094// Constraint management methods                                         //
    10195//-----------------------------------------------------------------------//
    10296
    10397
    104 #line 293 "QcSolver.ch"
    105 inline vector<QcConstraint> const &QcSolver::Inconsistant() const
     98inline std::vector<QcConstraint> const &QcSolver::Inconsistant() const
    10699{
    107100  return fInconsistant;
    108101}
    109102
    110103
    111 #line 447 "QcSolver.ch"
    112104inline void
    113105QcSolver::BeginAddConstraint()
    114106{
     
    120112}
    121113
    122114
    123 #line 461 "QcSolver.ch"
    124115inline bool
    125116QcSolver::inBatch()
    126117{
     
    143134
    144135
    145136
    146 #line 546 "QcSolver.ch"
    147137//-----------------------------------------------------------------------//
    148138// Constraint Solving methods                                            //
    149139//-----------------------------------------------------------------------//
    150140
    151 #line 579 "QcSolver.ch"
    152141//-----------------------------------------------------------------------//
    153142// Low Level Edit Variable Interface for use by solvers. These functions //
    154143// manipulate the set of edit variables without any adjustment of the    //
     
    169158
    170159
    171160
    172 #line 625 "QcSolver.ch"
    173161//-----------------------------------------------------------------------//
    174162// Utility functions.                                                    //
    175163//-----------------------------------------------------------------------//
    176164
    177165
    178 #line 653 "QcSolver.ch"
    179166#if qcCheckPost
    180167
    181168inline bool
     
    194181}
    195182
    196183
    197 #line 681 "QcSolver.ch"
    198184inline void
    199185QcSolver::addCheckedConstraint(QcConstraintRep *c)
    200186{
     
    203189}
    204190
    205191
    206 #line 723 "QcSolver.ch"
    207192inline void
    208193QcSolver::changeCheckedConstraint(QcConstraintRep *oldc, numT rhs)
    209194{
    210195  oldc->SetRHS( rhs);
    211196}
    212197
    213 inline vector<QcConstraintRep *>::const_iterator
     198inline std::vector<QcConstraintRep *>::const_iterator
    214199QcSolver::checkedConstraints_abegin() const
    215200{
    216201  return checkedConstraints.begin();
    217202}
    218203
    219 inline vector<QcConstraintRep *>::const_iterator
     204inline std::vector<QcConstraintRep *>::const_iterator
    220205QcSolver::checkedConstraints_aend() const
    221206{
    222207  return checkedConstraints.end();
    223208}
    224209
    225 inline vector<QcConstraintRep *>::size_type
     210inline std::vector<QcConstraintRep *>::size_type
    226211QcSolver::checkedConstraints_size() const
    227212{
    228213  return checkedConstraints.size();
     
    231216#endif
    232217
    233218
    234 #line 769 "QcSolver.ch"
    235219#ifndef qcNoStream
    236 inline ostream &operator<< (ostream &os, const QcSolver &s)
     220inline std::ostream &operator<< (std::ostream &os, const QcSolver &s)
    237221{
    238222  s.Print (os);
    239223  return os;
  • qoca/QcState.hh

     
    2727#ifndef __QcStateH
    2828#define __QcStateH
    2929
    30 #include <iostream.h>
     30#include <iostream>
    3131
    3232class QcState
    3333{
     
    3737    //-----------------------------------------------------------------------//
    3838    // Utililty functions.                                                   //
    3939    //-----------------------------------------------------------------------//
    40     virtual void Print(ostream &os) = 0;
     40    virtual void Print(std::ostream &os) = 0;
    4141};
    4242
    4343#endif
  • qoca/QcQuasiRowColStateVector.H

     
    11// Generated automatically from QcQuasiRowColStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx.
    22#ifndef QcQuasiRowColStateVectorDCL
    33#define QcQuasiRowColStateVectorDCL
    4 #line 1 "QcQuasiRowColStateVector.ch"
    54// $Id: QcQuasiRowColStateVector.ch,v 1.4 2001/01/30 01:32:08 pmoulder Exp $
    65
    76//============================================================================//
     
    2827// included with the above copyright notice.                                  //
    2928//============================================================================//
    3029
    31 #include <iostream.h>
     30#include <iostream>
    3231#include <qoca/QcQuasiRowStateVector.H>
    3332
    3433#include <qoca/QcQuasiColStateVector.hh>
     
    4342inline
    4443QcQuasiRowColStateVector(QcQuasiRowStateVector *rs,
    4544             QcQuasiColStateVector *cs);
    46 #line 47 "QcQuasiRowColStateVector.ch"
    4745protected:
    4846/** This constructor should only be used by derived classes.  The derived
    4947    class should initialize all the member data in this class. */
     
    6563//-----------------------------------------------------------------------//
    6664inline void
    6765Restart();
    68 #line 73 "QcQuasiRowColStateVector.ch"
    6966inline void
    7067Reserve(unsigned rows, unsigned cols);
    71 #line 80 "QcQuasiRowColStateVector.ch"
    7268#if 0 /* unused */
    7369
    7470virtual void
    7571SwapRows(unsigned c1, unsigned c2);
    76 #line 135 "QcQuasiRowColStateVector.ch"
    7772#endif /* unused */
    7873
    7974//-----------------------------------------------------------------------//
    8075// Utility functions.                                                    //
    8176//-----------------------------------------------------------------------//
    8277inline void
    83 Print(ostream &os);
    84 #line 148 "QcQuasiRowColStateVector.ch"
     78Print(std::ostream &os);
    8579public:
    8680  QcQuasiRowStateVector *fRowState;
    8781  QcQuasiColStateVector *fColState;
  • qoca/QcDelLinEqTableau.hh

     
    8787    //-----------------------------------------------------------------------//
    8888    // Utility function.                                                     //
    8989    //-----------------------------------------------------------------------//
    90     virtual void Print(ostream &os) const;
     90    virtual void Print(std::ostream &os) const;
    9191
    92     virtual void TransitiveClosure(vector<unsigned int> &vars)
     92    virtual void TransitiveClosure(std::vector<unsigned int> &vars)
    9393        { CAST(QcDelCoreTableau *, fCoreTableau)->TransitiveClosure(vars); }
    9494
    9595protected:
     
    117117{
    118118}
    119119
    120 inline void QcDelLinEqTableau::Print(ostream &os) const
     120inline void QcDelLinEqTableau::Print(std::ostream &os) const
    121121{
    122122    QcLinEqTableau::Print(os);
    123123    fCoreTableau->Print(os);
    124     os << endl << "Consistant: "
    125         << (IsValidSolvedForm() ? "yes" : "no") << endl;
     124    os << std::endl << "Consistant: "
     125        << (IsValidSolvedForm() ? "yes" : "no") << std::endl;
    126126}
    127127
    128128#endif /* !__QcDelLinEqTableauH */
  • qoca/QcVariableBiMap.hh

     
    22#include "QcVariableBiMap.H"
    33#ifndef QcVariableBiMapIFN
    44#define QcVariableBiMapIFN
    5 #line 1 "QcVariableBiMap.ch"
    65
    7 #line 7 "QcVariableBiMap.ch"
    86#include <qoca/QcAliasedBiMap.hh>
    97
    108
    11 #line 14 "QcVariableBiMap.ch"
    129#define super QcAliasedBiMap<QcNullableFloat, QcFloat, QcFloatRep>
    1310
    1411
     
    1613
    1714
    1815
    19 #line 28 "QcVariableBiMap.ch"
    2016#ifndef NDEBUG
    2117
    22 #line 53 "QcVariableBiMap.ch"
    2318#endif
    2419
    2520
    26 #line 72 "QcVariableBiMap.ch"
    2721//-----------------------------------------------------------------------//
    2822// Query functions                                                       //
    2923//-----------------------------------------------------------------------//
    3024
    31 #line 103 "QcVariableBiMap.ch"
    3225/*
    3326  Local Variables:
    3427  mode:c++
  • qoca/QcLinInEqSystem.hh

     
    9797    virtual void Solve();
    9898
    9999protected:
    100     vector<unsigned int> fArtVars;
     100    std::vector<unsigned int> fArtVars;
    101101   
    102102    virtual int AddToTableau(QcConstraint &c);
    103103        // Does first part of addConstraint, calling the correct tableau
  • qoca/QcSparseMatrix.cc

     
    3434# define MAX(_a, _b) ((_a) > (_b) ? (_a) : (_b))
    3535#endif
    3636
     37using namespace std;
     38
    3739QcSparseMatrix::~QcSparseMatrix()
    3840{
    3941  TrimRows( 0);
  • qoca/QcLinEqColStateVector.H

     
    11// Generated automatically from QcLinEqColStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx.
    22#ifndef QcLinEqColStateVectorDCL
    33#define QcLinEqColStateVectorDCL
    4 #line 1 "QcLinEqColStateVector.ch"
    54// $Id: QcLinEqColStateVector.ch,v 1.2 2000/12/06 05:32:56 pmoulder Exp $
    65
    76//============================================================================//
     
    5655
    5756void
    5857assertLinkageInvar() const;
    59 #line 113 "QcLinEqColStateVector.ch"
    6058protected:
    6159
    6260
    6361virtual void
    6462virtualAssertLinkageInvar() const;
    65 #line 121 "QcLinEqColStateVector.ch"
    6663#endif /* !NDEBUG */
    6764
    6865
     
    7370
    7471inline numT
    7572GetDesireValue(unsigned i) const;
    76 #line 136 "QcLinEqColStateVector.ch"
    7773inline bool
    7874IsBasic(unsigned i) const;
    79 #line 143 "QcLinEqColStateVector.ch"
    8075inline int
    8176IsBasicIn(unsigned i) const;
    82 #line 151 "QcLinEqColStateVector.ch"
    8377//-----------------------------------------------------------------------//
    8478// Set functions.                                                        //
    8579//-----------------------------------------------------------------------//
    8680inline void
    8781SetDesireValue(unsigned i, numT dv) const;
    88 #line 161 "QcLinEqColStateVector.ch"
    8982inline QcLinEqColState *
    9083head( bool isbasic);
    91 #line 172 "QcLinEqColStateVector.ch"
    9284void
    9385SetBasic(unsigned i, bool b);
    94 #line 187 "QcLinEqColStateVector.ch"
    9586inline void
    9687SetBasicIn(unsigned i, int bi) const;
    97 #line 195 "QcLinEqColStateVector.ch"
    9888//-----------------------------------------------------------------------//
    9989// Manipulation functions.                                               //
    10090//-----------------------------------------------------------------------//
    10191
    10292virtual void
    10393FixLinkage();
    104 #line 223 "QcLinEqColStateVector.ch"
    10594inline void
    10695Link(QcLinEqColState *state, QcLinEqColState *head);
    107 #line 238 "QcLinEqColStateVector.ch"
    10896inline void
    10997Unlink(QcLinEqColState *state);
    110 #line 251 "QcLinEqColStateVector.ch"
    11198protected:
    11299
    113100
    114101virtual void
    115102Alloc(QcState **start, QcState **finish);
    116 #line 269 "QcLinEqColStateVector.ch"
    117103virtual void
    118104AddToList(QcState **start, QcState **finish);
    119 #line 292 "QcLinEqColStateVector.ch"
    120105virtual void
    121106RemoveFromList(QcState **start, QcState **finish);
    122 #line 310 "QcLinEqColStateVector.ch"
    123107public:
    124108
    125109
    126110virtual void
    127 Print(ostream &os) const;
    128 #line 339 "QcLinEqColStateVector.ch"
     111Print(std::ostream &os) const;
    129112private:
    130113inline QcLinEqColState *
    131114getState(unsigned i) const;
    132 #line 351 "QcLinEqColStateVector.ch"
    133115public:
    134116  QcLinEqColState fParamHead; // head of linked list of non-basic variables.
    135117  QcLinEqColState fBasicHead; // head of linked list of basic variables.
  • qoca/QcConstraint.hh

     
    184184    //------------------------------------------------------------------------//
    185185    // Utility functions                                                      //
    186186    //------------------------------------------------------------------------//
    187     void Print(ostream &os) const
     187    void Print(std::ostream &os) const
    188188        { fRep->Print(os); }
    189189
    190190    bool isDead() const
     
    312312#endif /* QOCA_NO_FANCY_OPERATORS */
    313313
    314314#ifndef qcNoStream
    315 inline ostream &operator<<(ostream &os, const QcConstraint &c)
     315inline std::ostream &operator<<(std::ostream &os, const QcConstraint &c)
    316316{
    317317    c.Print(os);
    318318    return os;
  • qoca/QcLinPoly.hh

     
    109109    //-----------------------------------------------------------------------//
    110110    // Utility functions                                                     //
    111111    //-----------------------------------------------------------------------//
    112     virtual void Print(ostream &os) const;
     112    virtual void Print(std::ostream &os) const;
    113113
    114114private:
    115115    void doPlus(numT coeff, QcFloatRep *var);
     
    199199}
    200200
    201201#ifndef qcNoStream
    202 inline ostream& operator<<(ostream &os, const QcLinPoly &p)
     202inline std::ostream& operator<<(std::ostream &os, const QcLinPoly &p)
    203203{
    204204    p.Print(os);
    205205    return os;
  • qoca/QcLinInEqSolver.hh

     
    150150    void SubSysEqSolve();
    151151
    152152public:
    153     virtual void Print(ostream &os) const;
     153    virtual void Print(std::ostream &os) const;
    154154    virtual void Restart();
    155155    void TransitiveClosure();
    156156        // Calculate fDepBasicVars and fDepPars as transitive closure of
     
    226226      }
    227227
    228228  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.
    231231  };
    232232
    233233
     
    262262  /** Index of artificial variable in fSubSystem. */
    263263  int fAI;
    264264
    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;
    271271
    272272  QcVariableBiMap &fVBiMap;
    273273  const QcBiMapNotifier &fNotifier;
  • qoca/QcException.hh

     
    3131#include "qoca/QcDefines.hh"
    3232
    3333#ifndef qcNoStream
    34 #include <iostream.h>
     34#include <iostream>
    3535#endif
    3636
    3737//#ifdef DEBUG
  • qoca/QcLinEqSystem.cc

     
    3838#include "qoca/QcConstraintIndexIterator.hh"
    3939#include "qoca/QcDenseTableauRowIterator.hh"
    4040
     41using namespace std;
     42
    4143#if qcCheckInternalInvar
    4244void QcLinEqSystem::assertDeepInvar() const
    4345{
  • qoca/QcOrigRowStateVector.H

     
    11// Generated automatically from QcOrigRowStateVector.ch by /home/pmoulder/usr/local/bin/ch2xx.
    22#ifndef QcOrigRowStateVectorDCL
    33#define QcOrigRowStateVectorDCL
    4 #line 1 "QcOrigRowStateVector.ch"
    54// $Id: QcOrigRowStateVector.ch,v 1.2 2000/12/06 05:32:56 pmoulder Exp $
    65// Originally written by Alan Finlay and Sitt Sen Chok
    76
     
    4140
    4241inline
    4342QcOrigRowStateVector();
    44 #line 44 "QcOrigRowStateVector.ch"
    4543//-----------------------------------------------------------------------//
    4644// Query functions.                                                      //
    4745//-----------------------------------------------------------------------//
    4846
    4947inline bool
    5048GetARowDeleted(unsigned i) const;
    51 #line 55 "QcOrigRowStateVector.ch"
    5249inline int
    5350GetMRowIndex(unsigned i) const;
    54 #line 63 "QcOrigRowStateVector.ch"
    5551inline numT
    5652GetRHS(unsigned i) const;
    57 #line 71 "QcOrigRowStateVector.ch"
    5853//-----------------------------------------------------------------------//
    5954// Set* functions.
    6055//-----------------------------------------------------------------------//
    6156inline void
    6257SetARowDeleted(unsigned i, bool d);
    63 #line 81 "QcOrigRowStateVector.ch"
    6458inline void
    6559SetMRowIndex(unsigned i, int ri);
    66 #line 88 "QcOrigRowStateVector.ch"
    6760inline void
    6861SetRHS(unsigned i, numT rhs);
    69 #line 95 "QcOrigRowStateVector.ch"
    7062//-----------------------------------------------------------------------//
    7163// Manipulation functions.                                               //
    7264//-----------------------------------------------------------------------//
    7365
    7466virtual void
    7567FixLinkage();
    76 #line 104 "QcOrigRowStateVector.ch"
    7768protected:
    7869
    7970
    8071virtual void
    8172Alloc(QcState **start, QcState **finish);
    82 #line 122 "QcOrigRowStateVector.ch"
    8373virtual void
    8474AddToList(QcState **start, QcState **finish);
    85 #line 135 "QcOrigRowStateVector.ch"
    8675virtual void
    8776RemoveFromList(QcState **start, QcState **finish);
    88 #line 152 "QcOrigRowStateVector.ch"
    8977#ifndef NDEBUG
    9078
    9179virtual void
    9280virtualAssertLinkageInvar() const;
    93 #line 165 "QcOrigRowStateVector.ch"
    9481#endif
    9582
    9683public:
    9784
    9885
    9986virtual inline void
    100 Print(ostream &os) const;
    101 #line 178 "QcOrigRowStateVector.ch"
     87Print(std::ostream &os) const;
    10288private:
    10389inline QcOrigRowState *
    10490getState( unsigned i) const;
    105 #line 188 "QcOrigRowStateVector.ch"
    10691};
    10792
    10893
  • qoca/QcQuasiColStateVector.hh

     
    4545  //-----------------------------------------------------------------------//
    4646  // Utility functions.                                                    //
    4747  //-----------------------------------------------------------------------//
    48   virtual void Print(ostream &os) const;
     48  virtual void Print(std::ostream &os) const;
    4949};
    5050
    5151inline QcQuasiColStateVector::QcQuasiColStateVector()
     
    5353{
    5454}
    5555
    56 inline void QcQuasiColStateVector::Print(ostream &os) const
     56inline void QcQuasiColStateVector::Print(std::ostream &os) const
    5757{
    58     os << endl << "Column State Vector:";
     58    os << std::endl << "Column State Vector:";
    5959    QcStateVector::Print(os);
    6060}
    6161
  • qoca/QcDelCoreTableau.hh

     
    151151    virtual void ScaleRow(unsigned row, numT factor);
    152152    virtual void CopyColumn(unsigned destCol, unsigned srcCol);
    153153
    154     void TransitiveClosure(vector<unsigned int> &vars) const;
     154    void TransitiveClosure(std::vector<unsigned int> &vars) const;
    155155        // Compute the transitive closure of a set of variables, using the
    156156        // relation "belong to the same original constraint".
    157157
    158158    //-----------------------------------------------------------------------//
    159159    // Utility functions.                                                    //
    160160    //-----------------------------------------------------------------------//
    161     virtual void Print(ostream &os) const;
     161    virtual void Print(std::ostream &os) const;
    162162};
    163163
    164164inline void QcDelCoreTableau::AddScaledRow(unsigned destRow, unsigned srcRow,
     
    242242}
    243243
    244244#ifndef qcNoStream
    245 inline ostream &operator<<(ostream &os, const QcDelCoreTableau &t)
     245inline std::ostream &operator<<(std::ostream &os, const QcDelCoreTableau &t)
    246246{
    247247    t.Print(os);
    248248    return os;
  • qoca/KeyIterator.hh

     
    11#ifndef KeyIteratorHH
    22#define KeyIteratorHH
    33
    4 template <class Iterator, class Key>
     4template <class Iterator, typename Key>
    55class KeyIterator
    66  : public Iterator
    77{
  • qoca/QcLinPolyTerm.hh

     
    121121    // Utility functions.                                                    //
    122122    //-----------------------------------------------------------------------//
    123123public:
    124     virtual void Print(ostream &os) const;
     124    virtual void Print(std::ostream &os) const;
    125125
    126126private:
    127127    numT fCoeff;
     
    159159}
    160160#endif
    161161
    162 inline void QcLinPolyTerm::Print(ostream &os) const
     162inline void QcLinPolyTerm::Print(std::ostream &os) const
    163163{
    164164  const char *name = fVariable.Name();
    165165
     
    209209  return QcLinPolyTerm( coeff, var);
    210210}
    211211
    212 inline ostream& operator<<(ostream &os, const QcLinPolyTerm &term)
     212inline std::ostream& operator<<(std::ostream &os, const QcLinPolyTerm &term)
    213213{
    214214  term.Print( os);
    215215  return os;
  • qoca/QcCoreTableau.hh

     
    217217    //-----------------------------------------------------------------------//
    218218    // Utility functions.                                                    //
    219219    //-----------------------------------------------------------------------//
    220     virtual void Print(ostream &os) const;
     220    virtual void Print(std::ostream &os) const;
    221221
    222222protected:
    223223    QcQuasiRowColStateVector &fRowColState;
     
    268268}
    269269
    270270#ifndef qcNoStream
    271 inline ostream &operator<<(ostream &os, const QcCoreTableau &t)
     271inline std::ostream &operator<<(std::ostream &os, const QcCoreTableau &t)
    272272{
    273273    t.Print(os);
    274274    return os;
  • qoca/QcLinEqSolver.cc

     
    3333#include "qoca/QcSparseMatrixRowIterator.hh"
    3434#include "qoca/QcVariableIndexIterator.hh"
    3535
     36using namespace std;
     37
    3638#ifndef NDEBUG
    3739void QcLinEqSolver::assertDeepInvar() const
    3840{
  • qoca/QcOrigRowState.hh

     
    4747    //-----------------------------------------------------------------------//
    4848    // Utility functions.                                                    //
    4949    //-----------------------------------------------------------------------//
    50     virtual void Print(ostream &os);
     50    virtual void Print(std::ostream &os);
    5151};
    5252
    5353inline QcOrigRowState::QcOrigRowState(int ci)
     
    5858{
    5959}
    6060
    61 inline void QcOrigRowState::Print(ostream &os)
     61inline void QcOrigRowState::Print(std::ostream &os)
    6262{
    6363    os << "[RHS(" << fRHS << "),"
    6464        << "[MRowIndex(" << fMRowIndex << "),"
  • qoca/QcSolver.cc

     
    11// Generated automatically from QcSolver.ch by /home/pmoulder/usr/local/bin/ch2xx.
    22#include "QcSolver.hh"
    3 #line 1 "QcSolver.ch"
    43// $Id: QcSolver.ch,v 1.21 2001/01/30 01:32:08 pmoulder Exp $
    54
    65//============================================================================//
     
    2726// included with the above copyright notice.                                  //
    2827//============================================================================//
    2928
    30 #include <vector.h>
    31 #include <algo.h>
     29#include <vector>
     30#include <algorithm>
    3231#include "qoca/QcConstraint.hh"
    3332#include <qoca/QcFixedFloatRep.hh>
    3433
    3534
     35using namespace std;
    3636
    3737
    3838
    39 
    4039//-----------------------------------------------------------------------//
    4140// Constructor.                                                          //
    4241//-----------------------------------------------------------------------//
    43 #line 52 "QcSolver.ch"
    4442#if qcCheckInternalInvar
    45 #line 59 "QcSolver.ch"
    4643void
    4744QcSolver::assertDeepInvar() const
    4845{
     
    7168//-----------------------------------------------------------------------//
    7269
    7370
    74 #line 96 "QcSolver.ch"
    7571void
    7672QcSolver::addVar (QcFloatRep *v)
    7773{
     
    9591
    9692
    9793
    98 #line 125 "QcSolver.ch"
    9994bool
    10095QcSolver::RemoveVar (QcFloat &v)
    10196{
     
    10499}
    105100
    106101
    107 #line 156 "QcSolver.ch"
    108102//-----------------------------------------------------------------------//
    109103// Enquiry functions for variables                                       //
    110104//-----------------------------------------------------------------------//
    111105
    112 #line 169 "QcSolver.ch"
    113106bool QcSolver::IsFree (QcFloat const &v) const
    114107{
    115108  UNUSED(v);
     
    118111
    119112
    120113
    121 #line 194 "QcSolver.ch"
    122114bool
    123115QcSolver::IsEditVar(QcFloat const &v) const
    124116{
     
    132124}
    133125
    134126
    135 #line 214 "QcSolver.ch"
    136127/* ----------------------------------------------------------------------
    137128   High Level Edit Variable Interface for use by solver clients. Edit
    138129   variables are set and unset with the following interface. The
     
    154145}
    155146
    156147
    157 #line 268 "QcSolver.ch"
    158148void
    159149QcSolver::EndEdit()
    160150{
     
    167157}
    168158
    169159
    170 #line 285 "QcSolver.ch"
    171160//-----------------------------------------------------------------------//
    172161// Constraint management methods                                         //
    173162//-----------------------------------------------------------------------//
    174163
    175164
    176 #line 313 "QcSolver.ch"
    177165#ifdef qcCheckPost /* swallow nyi unless compiled with qcCheckPost defined */
    178166bool QcSolver::swallow (QcSolver *other)
    179167{
     
    195183
    196184
    197185
    198 #line 383 "QcSolver.ch"
    199186void
    200187QcSolver::AddWeightedConstraint(QcConstraint &c, numT weight)
    201188{
     
    257244
    258245
    259246
    260 #line 497 "QcSolver.ch"
    261247bool
    262248QcSolver::EndAddConstraint()
    263249{
     
    279265
    280266
    281267
    282 #line 522 "QcSolver.ch"
    283268bool QcSolver::RemoveConstraint(QcConstraint &c)
    284269{
    285270  UNUSED(c);
     
    288273
    289274
    290275
    291 #line 546 "QcSolver.ch"
    292276//-----------------------------------------------------------------------//
    293277// Constraint Solving methods                                            //
    294278//-----------------------------------------------------------------------//
    295279
    296 #line 579 "QcSolver.ch"
    297280//-----------------------------------------------------------------------//
    298281// Low Level Edit Variable Interface for use by solvers. These functions //
    299282// manipulate the set of edit variables without any adjustment of the    //
     
    302285//-----------------------------------------------------------------------//
    303286
    304287
    305 #line 599 "QcSolver.ch"
    306288void QcSolver::RemoveEditVar (QcFloat &v)
    307289{
    308290  vector<QcFloat>::iterator it;
     
    321303}
    322304
    323305
    324 #line 625 "QcSolver.ch"
    325306//-----------------------------------------------------------------------//
    326307// Utility functions.                                                    //
    327308//-----------------------------------------------------------------------//
     
    352333
    353334#if qcCheckPost
    354335
    355 #line 671 "QcSolver.ch"
    356336void QcSolver::checkSatisfied() const
    357337{
    358338  for (int i = checkedConstraints.size(); --i >= 0;)
     
    363343}
    364344
    365345
    366 #line 689 "QcSolver.ch"
    367346void
    368347QcSolver::removeCheckedConstraint(QcConstraintRep *c)
    369348{
     
    398377}
    399378
    400379
    401 #line 747 "QcSolver.ch"
    402380#endif
    403381
    404382
    405 #line 769 "QcSolver.ch"
    406383#ifndef qcNoStream
    407 #line 775 "QcSolver.ch"
    408384#endif
    409385
    410386/*
  • qoca/QcLinEqRowState.hh

     
    5353    //-----------------------------------------------------------------------//
    5454    // Utility functions.                                                    //
    5555    //-----------------------------------------------------------------------//
    56     virtual void Print(ostream &os);
     56    virtual void Print(std::ostream &os);
    5757
    5858  int getCondition() const
    5959  {
     
    108108    fBasicVar = QcTableau::fInvalidVariableIndex;
    109109}
    110110
    111 inline void QcLinEqRowState::Print(ostream &os)
     111inline void QcLinEqRowState::Print(std::ostream &os)
    112112{
    113113    QcQuasiRowState::Print(os);
    114114
  • qoca/QcUtility.hh

     
    6060    //-----------------------------------------------------------------------//
    6161
    6262  static bool IsVaguelyZero(numT val)
    63     { return fabs( val) < qcVaguelyNearEps; }
     63    { return fabs( val) < QcUtility::qcVaguelyNearEps; }
    6464
    6565  static bool IsNearZero(numT val)
    66     { return fabs( val) < qcNearEps; }
     66    { return fabs( val) < QcUtility::qcNearEps; }
    6767
    6868  static bool IsZero(double val)
    69     { return fabs( val) < qcEps; }
     69    { return fabs( val) < QcUtility::qcEps; }
    7070
    7171  static bool IsOne(double val)
    72     { return IsZero( val - 1.0); }
     72    { return QcUtility::IsZero( val - 1.0); }
    7373
    7474  static bool IsNegative(numT val)
    75     { return (val <= -qcEps); }
     75    { return (val <= -QcUtility::qcEps); }
    7676
    7777  static bool IsPositive(numT val)
    78     { return (val >= qcEps); }
     78    { return (val >= QcUtility::qcEps); }
    7979
    8080  static double Zeroise(double val)
    8181    {
    82       return (IsZero( val)
     82      return (QcUtility::IsZero( val)
    8383          ? 0.0
    8484          : val);
    8585    }
     
    8787#ifndef NDEBUG
    8888  static bool IsZeroised(double val)
    8989    {
    90       return (val == 0 || !IsZero( val));
     90      return (val == 0 || !QcUtility::IsZero( val));
    9191    }
    9292#endif
    9393
  • qoca/QcSolvedFormMatrix.hh

     
    118118  unsigned fColumns;
    119119#endif
    120120#ifdef qcRealTableauRHS
    121   vector<numT> fRHS;
     121  std::vector<numT> fRHS;
    122122#elif !defined(qcRealTableauCoeff) && qcCheckInternalPre
    123123  unsigned fRows;
    124124#endif
  • qoca/QcTableau.hh

     
    166166    //-----------------------------------------------------------------------//
    167167    // Utility functions.                                                    //
    168168    //-----------------------------------------------------------------------//
    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);
    171171};
    172172
    173173inline QcTableau::QcTableau(QcBiMapNotifier &n)
     
    192192    return false;
    193193}
    194194
    195 inline void QcTableau::Print(ostream &os) const
     195inline void QcTableau::Print(std::ostream &os) const
    196196{
    197     os << "Begin[Tableau]" << endl;
     197    os << "Begin[Tableau]" << std::endl;
    198198    fNotifier.Print(os);
    199     os << "End[Tableau]" << endl;
     199    os << "End[Tableau]" << std::endl;
    200200}
    201201
    202202inline int QcTableau::RemoveEq(unsigned ci)
     
    213213    return false;
    214214}
    215215
    216 inline void QcTableau::TransitiveClosure(vector<unsigned int> &vars)
     216inline void QcTableau::TransitiveClosure(std::vector<unsigned int> &vars)
    217217{
    218218    UNUSED(vars);
    219219    throw QcWarning("Error: Should not call QcTableau::TransitiveClosure");
  • qoca/QcCompPivotTableau.hh

     
    9292    //------------------------------------------------------------------------//
    9393    // Utility functions.                                                     //
    9494    //------------------------------------------------------------------------//
    95     virtual void Print(ostream &os) const;
     95    virtual void Print(std::ostream &os) const;
    9696};
    9797
    9898inline QcCompPivotTableau::QcCompPivotTableau(int hintRows, int hintCols,
  • qoca/QcDelLinEqTableau.cc

     
    2424// included with the above copyright notice.                                  //
    2525//============================================================================//
    2626
    27 #include <math.h>
     27#include <cmath>
    2828#include "qoca/QcDefines.hh"
    2929#include "qoca/QcDelLinEqTableau.hh"
    3030#ifdef qcDenseQuasiInverse
  • qoca/QcVariableBiMap.cc

     
    11// Generated automatically from QcVariableBiMap.ch by /home/pmoulder/usr/local/bin/ch2xx.
    22#include "QcVariableBiMap.hh"
    3 #line 1 "QcVariableBiMap.ch"
    43
    5 #line 10 "QcVariableBiMap.ch"
    64#include <stdio.h>
    75
     6using namespace std;
    87
    9 
    108#define super QcAliasedBiMap<QcNullableFloat, QcFloat, QcFloatRep>
    119
    1210
     
    1412
    1513
    1614
    17 #line 28 "QcVariableBiMap.ch"
    1815#ifndef NDEBUG
    1916
    2017void
  • qoca/QcVariableBiMap.H

     
    11// Generated automatically from QcVariableBiMap.ch by /home/pmoulder/usr/local/bin/ch2xx.
    22#ifndef QcVariableBiMapDCL
    33#define QcVariableBiMapDCL
    4 #line 1 "QcVariableBiMap.ch"
    54
    65#include <qoca/QcDefines.hh>
    76#include <qoca/QcAliasedBiMap.H>
    87#include <qoca/QcNullableFloat.hh>
    98
    109
    11 #line 14 "QcVariableBiMap.ch"
    1210#define super QcAliasedBiMap<QcNullableFloat, QcFloat, QcFloatRep>
    1311
    1412class QcVariableBiMap
     
    2725
    2826void
    2927assertInvar() const;
    30 #line 40 "QcVariableBiMap.ch"
    3128void
    3229assertDeepInvar() const;
    33 #line 48 "QcVariableBiMap.ch"
    3430virtual void
    3531vAssertDeepInvar() const;
    36 #line 53 "QcVariableBiMap.ch"
    3732#endif
    3833
    3934
    4035void
    4136Update(QcFloat const &ident, int index);
    42 #line 64 "QcVariableBiMap.ch"
    4337void
    4438Update(QcFloatRep *ident, int index);
    45 #line 72 "QcVariableBiMap.ch"
    4639//-----------------------------------------------------------------------//
    4740// Query functions                                                       //
    4841//-----------------------------------------------------------------------//
    4942
    5043void
    51 GetVariableSet(vector<QcFloat> &vars);
    52 #line 100 "QcVariableBiMap.ch"
     44GetVariableSet(std::vector<QcFloat> &vars);
    5345};
    5446
    5547
  • qoca/QcLinInEqSystem.cc

     
    3838#include "qoca/QcTableauColIterator.hh"
    3939#include "qoca/QcDenseTableauRowIterator.hh"
    4040
     41using namespace std;
     42
    4143bool QcLinInEqSystem::AddConstraint(QcConstraint &c)
    4244{
    4345    return doAddConstraint(c, -1);
  • qoca/QcConstraintRep.hh

     
    195195    //-----------------------------------------------------------------------//
    196196    // Utility functions                                                     //
    197197    //-----------------------------------------------------------------------//
    198     virtual void Print(ostream &os) const;
     198    virtual void Print(std::ostream &os) const;
    199199
    200200protected:
    201201    static TId fNextValidId;
     
    320320#endif
    321321
    322322#ifndef qcNoStream
    323 inline ostream &operator<<(ostream &os, const QcConstraintRep &r)
     323inline std::ostream &operator<<(std::ostream &os, const QcConstraintRep &r)
    324324{
    325325    r.Print(os);
    326326    return os;
  • qoca/QcQuasiRowColStateVector.hh

     
    22#include "QcQuasiRowColStateVector.H"
    33#ifndef QcQuasiRowColStateVectorIFN
    44#define QcQuasiRowColStateVectorIFN
    5 #line 1 "QcQuasiRowColStateVector.ch"
    65// $Id: QcQuasiRowColStateVector.ch,v 1.4 2001/01/30 01:32:08 pmoulder Exp $
    76
    87//============================================================================//
     
    4948}
    5049
    5150
    52 #line 63 "QcQuasiRowColStateVector.ch"
    5351//-----------------------------------------------------------------------//
    5452// Manipulation functions.                                               //
    5553//-----------------------------------------------------------------------//
     
    6967
    7068#if 0 /* unused */
    7169
    72 #line 135 "QcQuasiRowColStateVector.ch"
    7370#endif /* unused */
    7471
    7572//-----------------------------------------------------------------------//
    7673// Utility functions.                                                    //
    7774//-----------------------------------------------------------------------//
    7875inline void
    79 QcQuasiRowColStateVector::Print(ostream &os)
     76QcQuasiRowColStateVector::Print(std::ostream &os)
    8077{
    8178  fRowState->Print(os);
    8279  fColState->Print(os);
    8380}
    8481
    8582
    86 #line 155 "QcQuasiRowColStateVector.ch"
    8783/*
    8884  Local Variables:
    8985  mode:c++
  • qoca/QcLinInEqColState.hh

     
    9494  //-----------------------------------------------------------------------//
    9595  // Utility functions.                                                    //
    9696  //-----------------------------------------------------------------------//
    97   virtual void Print(ostream &os);
     97  virtual void Print(std::ostream &os);
    9898
    9999public:
    100100  /** A constrained variable may only take non-negative values and hence if it
     
    124124    fPrevStruct = 0;
    125125}
    126126
    127 inline void QcLinInEqColState::Print(ostream &os)
     127inline void QcLinInEqColState::Print(std::ostream &os)
    128128{
    129129    QcLinEqColState::Print(os);
    130130    os << ",IsConst(" << fIsConstrained << "),"
  • qoca/QcFloatRep.cc

     
    11// Generated automatically from QcFloatRep.ch by /home/pmoulder/usr/local/bin/ch2xx.
    22#include "QcFloatRep.hh"
    3 #line 1 "QcFloatRep.ch"
    43// $Id: QcFloatRep.ch,v 1.13 2001/01/10 05:01:51 pmoulder Exp $
    54
    65//============================================================================//
     
    3130#include "qoca/QcUtility.hh"
    3231
    3332
    34 #line 48 "QcFloatRep.ch"
     33using namespace std;
     34
    3535    //-----------------------------------------------------------------------//
    3636    // Constructors                                                          //
    3737    //-----------------------------------------------------------------------//
     
    5858}
    5959
    6060
    61 #line 93 "QcFloatRep.ch"
    6261//-----------------------------------------------------------------------//
    6362// Set and Get member functions                                          //
    6463//-----------------------------------------------------------------------//
    6564
    66 #line 176 "QcFloatRep.ch"
    6765void QcFloatRep::SetWeight (numT w)
    6866{
    6967  qcAssertPre( isQcFloatRep());
     
    8381}
    8482
    8583
    86 #line 199 "QcFloatRep.ch"
    8784void
    8885QcFloatRep::SuggestValue (numT dv)
    8986{
     
    9289}
    9390
    9491
    95 #line 213 "QcFloatRep.ch"
    9692void QcFloatRep::SetName (char const *n)
    9793{
    9894  qcAssertPre( isQcFloatRep());
     
    127123  qcAssertPost (fName[len + qcMagic2Len] == '\0');
    128124}
    129125
    130 #line 279 "QcFloatRep.ch"
    131126#if qcCheckInternalPre
    132127void QcFloatRep::assertInvar() const
    133128{
     
    146141
    147142
    148143
    149 #line 299 "QcFloatRep.ch"
    150144bool QcFloatRep::FreeName()
    151145{
    152146  qcAssertPre( isQcFloatRep());
     
    170164}
    171165
    172166
    173 #line 352 "QcFloatRep.ch"
    174167//-----------------------------------------------------------------------//
    175168// Utility functions.                                                    //
    176169//-----------------------------------------------------------------------//
     
    191184}
    192185
    193186
    194 #line 414 "QcFloatRep.ch"
    195187QcFloatRep::TId QcFloatRep::fNextValidId = 1;
    196188
    197189/*
  • qoca/QcMatrix.hh

     
    152152    //-----------------------------------------------------------------------//
    153153    // Utility functions.                                                    //
    154154    //-----------------------------------------------------------------------//
    155     virtual void Print(ostream &os) const;
     155    virtual void Print(std::ostream &os) const;
    156156
    157157protected:
    158158    unsigned fAllocRows;        // Used only by Reserve
     
    166166{
    167167}
    168168
    169 inline void QcMatrix::Print(ostream &os) const
     169inline void QcMatrix::Print(std::ostream &os) const
    170170{
    171171    for (unsigned i = 0; i < fRows; i++) {
    172172        os << i << ":";
    173173        for (unsigned j = 0; j < fColumns; j++)
    174174            os << "\t" << GetValue(i, j);
    175         os << endl;
     175        os << std::endl;
    176176    }
    177177}
    178178
    179179#ifndef qcNoStream
    180 inline ostream &operator<<(ostream &os, const QcMatrix &m)
     180inline std::ostream &operator<<(std::ostream &os, const QcMatrix &m)
    181181{
    182182    m.Print(os);
    183183    return os;
  • qoca/QcFloat.hh

     
    237237    //-----------------------------------------------------------------------//
    238238    // Utility functions                                                     //
    239239    //-----------------------------------------------------------------------//
    240     void Print(ostream &os) const
     240    void Print(std::ostream &os) const
    241241    { fRep->Print(os); }
    242242
    243243protected:
     
    363363}
    364364
    365365#ifndef qcNoStream
    366 inline ostream &operator<<(ostream &os, const QcFloat &cf)
     366inline std::ostream &operator<<(std::ostream &os, const QcFloat &cf)
    367367{
    368368    cf.Print(os);
    369369    return os;
  • qoca/QcLinEqTableau.hh

     
    2727#ifndef __QcLinEqTableauH
    2828#define __QcLinEqTableauH
    2929
    30 #include <deque.h>
    31 #include <vector.h>
     30#include <deque>
     31#include <vector>
    3232#include "qoca/QcTableau.hh"
    3333#include "qoca/QcSparseCoeff.hh"
    3434#include "qoca/QcDelCoreTableau.hh"
     
    4343    QcCoreTableau *fCoreTableau;
    4444
    4545public:
    46     deque<unsigned int> fPivotHints;
     46    std::deque<unsigned int> fPivotHints;
    4747        // During an eliminate operation, fPivotHints is erased and then
    4848        // the indices of parametric variables that do not have zero
    4949        // solved form coeffs are recorded.  These are likely to be good
     
    295295    //-----------------------------------------------------------------------//
    296296    // Utility function.                                                     //
    297297    //-----------------------------------------------------------------------//
    298     virtual void Print(ostream &os) const;
     298    virtual void Print(std::ostream &os) const;
    299299
    300300protected:
    301301    //-----------------------------------------------------------------------//
  • qoca/QcLinEqColState.hh

     
    8282  //-----------------------------------------------------------------------//
    8383  // Utility functions.                                                    //
    8484  //-----------------------------------------------------------------------//
    85   virtual void Print(ostream &os);
     85  virtual void Print(std::ostream &os);
    8686
    8787private:
    8888  numT fDesValue;   // cache desired value of variable during solve
     
    119119{
    120120}
    121121
    122 inline void QcLinEqColState::Print(ostream &os)
     122inline void QcLinEqColState::Print(std::ostream &os)
    123123{
    124124    QcQuasiColState::Print(os);
    125125    os << ",DV(" << fDesValue << "),"
  • qoca/QcIneqSolverBase.H

     
    11// Generated automatically from QcIneqSolverBase.ch by /home/pmoulder/usr/local/bin/ch2xx.
    22#ifndef QcIneqSolverBaseDCL
    33#define QcIneqSolverBaseDCL
    4 #line 1 "QcIneqSolverBase.ch"
    54#include <qoca/QcSolver.H>
    65
    76#include <qoca/QcDelLinInEqSystem.hh>
     
    1211public:
    1312
    1413inline
    15 QcIneqSolverBase();
    16 #line 18 "QcIneqSolverBase.ch"
     14QcIneqSolverBase()
     15  : QcSolver(),
     16    fSystem()
     17{
     18    ;
     19}
     20
    1721inline
    18 QcIneqSolverBase(unsigned hintNumConstraints, unsigned hintNumVariables);
    19 #line 26 "QcIneqSolverBase.ch"
     22QcIneqSolverBase(unsigned hintNumConstraints, unsigned hintNumVariables)
     23  : QcSolver(),
     24    fSystem( hintNumConstraints, hintNumVariables)
     25{
     26    ;
     27}
     28
     29
    2030virtual ~QcIneqSolverBase()
    2131{
    2232}
     
    7888
    7989virtual bool
    8090AddConstraint(QcConstraint &c);
    81 #line 101 "QcIneqSolverBase.ch"
    8291virtual bool
    8392AddConstraint(QcConstraint &c, QcFloat &hint);
    84 #line 117 "QcIneqSolverBase.ch"
    8593virtual void
    8694BeginAddConstraint()
    8795{
     
    98106
    99107virtual bool
    100108ChangeConstraint(QcConstraint &oldc, numT rhs);
    101 #line 143 "QcIneqSolverBase.ch"
    102109virtual bool
    103110RemoveConstraint(QcConstraint &c);
    104 #line 159 "QcIneqSolverBase.ch"
    105111virtual bool
    106112Reset()
    107113{
  • qoca/QcLinPoly.cc

     
    2727#include "qoca/QcDefines.hh"
    2828#include "qoca/QcLinPoly.hh"
    2929
     30using namespace std;
     31
    3032QcLinPoly::QcLinPoly(const QcLinPoly& rhs)
    3133{
    3234    size_t n = rhs.fTerms.size();
  • qoca/QcDefines.hh

     
    173173  )
    174174
    175175#ifndef qcNoStream
    176 # include <iostream.h>
     176# include <iostream>
    177177#endif
    178178
    179179/* TODO: Maybe use autoconf to detect this.  (OTOH, I imagine that
  • qoca/QcLinInEqSolver.cc

     
    3434#include "qoca/QcStructVarIndexIterator.hh"
    3535#include "qoca/QcSparseMatrixRowIterator.hh"
    3636
     37using namespace std;
     38
    3739void QcLinInEqSolver::AddDualCoeffs(QcLinPoly &lpoly, int p)
    3840    // Used by Generate constraints to add the dual variable
    3941    // coefficients to a linpoly corresponding to parameter p.
  • qoca/QcCassSolver.hh

     
    2727#ifndef __QcCassSolverH
    2828#define __QcCassSolverH
    2929
    30 #include <map.h>
     30#include <map>
    3131#include "qoca/QcDelLinInEqSystem.hh"
    3232#include "qoca/QcCassConstraint.hh"
    3333
    3434class QcCassSolver : public QcDelLinInEqSystem
    3535{
    3636protected:
    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;
    4040
    4141    TStayMap fStayMap;
    4242    TEditMap fEditMap;
     
    9292    // Utility functions.                                                    //
    9393    //-----------------------------------------------------------------------//
    9494    virtual void Restart();
    95     virtual void Print(ostream &os) const;
     95    virtual void Print(std::ostream &os) const;
    9696};
    9797
    9898inline QcCassSolver::QcCassSolver()
  • layouter/ConstraintSolverLayouter.cpp

     
    66#include "ConstraintSolverLayouter.h"
    77
    88#include <math.h>
    9 #include <string.h>
     9#include <string>
    1010
    1111#include <LayoutUtils.h>
    1212#include <Size.h>