• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

/build/buildd/coinutils-2.6.4/CoinUtils/src/CoinShallowPackedVector.hpp

Go to the documentation of this file.
00001 /* $Id: CoinShallowPackedVector.hpp 1215 2009-11-05 11:03:04Z forrest $ */
00002 // Copyright (C) 2000, International Business Machines
00003 // Corporation and others.  All Rights Reserved.
00004 #ifndef CoinShallowPackedVector_H
00005 #define CoinShallowPackedVector_H
00006 
00007 #if defined(_MSC_VER)
00008 // Turn off compiler warning about long names
00009 #  pragma warning(disable:4786)
00010 #endif
00011 
00012 #include "CoinError.hpp"
00013 #include "CoinPackedVectorBase.hpp"
00014 
00072 class CoinShallowPackedVector : public CoinPackedVectorBase {
00073    friend void CoinShallowPackedVectorUnitTest();
00074 
00075 public:
00076   
00079 
00080    virtual int getNumElements() const { return nElements_; }
00082    virtual const int * getIndices() const { return indices_; }
00084    virtual const double * getElements() const { return elements_; }
00086 
00089 
00090    void clear();
00092    CoinShallowPackedVector& operator=(const CoinShallowPackedVector & x);
00094    CoinShallowPackedVector& operator=(const CoinPackedVectorBase & x);
00096    void setVector(int size, const int * indices, const double * elements,
00097                   bool testForDuplicateIndex = true);
00099 
00103    CoinShallowPackedVector(bool testForDuplicateIndex = true);
00112    CoinShallowPackedVector(int size,
00113                           const int * indices, const double * elements,
00114                           bool testForDuplicateIndex = true);
00116    CoinShallowPackedVector(const CoinPackedVectorBase &);
00118    CoinShallowPackedVector(const CoinShallowPackedVector &);
00120    ~CoinShallowPackedVector() {}
00122    void print();
00124 
00125 private:
00128 
00129    const int * indices_;
00131    const double * elements_;
00133    int nElements_;
00135 };
00136 
00137 //#############################################################################
00143 void
00144 CoinShallowPackedVectorUnitTest();
00145 
00146 #endif

Generated on Fri Oct 15 2010 18:21:02 by  doxygen 1.7.1