Changeset 9e5efff in git
- Timestamp:
- Apr 5, 2016, 4:50:42 PM (8 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- 281335d5bbcb1497be84e729427cf2f4b494c484
- Parents:
- 562b8aa65c17482d4bc6eb8332aab2af93e3806e
- Location:
- libpolys/misc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libpolys/misc/intvec.cc
r562b8aa r9e5efff 24 24 /*0 implementation*/ 25 25 26 // omBin intvec_bin = omGetSpecBin(sizeof(intvec)); 27 #if 0 28 intvec::intvec(intvec* iv) 29 { 30 row = iv->rows(); 31 col = iv->cols(); 32 v = (int *)omAlloc(sizeof(int)*row*col); 33 for (int i=0; i<row*col; i++) 34 { 35 v[i] = (*iv)[i]; 36 } 37 } 38 #endif 26 omBin intvec_bin = omGetSpecBin(sizeof(intvec)); 39 27 40 28 intvec::intvec(int s, int e) … … 265 253 return 0; 266 254 } 267 268 #if 0269 intvec * ivCopy(intvec * o)270 {271 intvec * iv=new intvec(o);272 return iv;273 }274 #endif275 255 276 256 intvec * ivAdd(intvec * a, intvec * b) -
libpolys/misc/intvec.h
r562b8aa r9e5efff 12 12 13 13 14 //extern omBin intvec_bin;14 extern omBin intvec_bin; 15 15 16 16 class intvec … … 52 52 void resize(int new_length); 53 53 inline int range(int i) const 54 { return ((i<row) && (i>=0) && (col==1)); } 54 //{ return ((i<row) && (i>=0) && (col==1)); } 55 { return ((((unsigned)i)<((unsigned)row)) && (col==1)); } 55 56 inline int range(int i, int j) const 56 { return ((i<row) && (i>=0) && (j<col) && (j>=0)); } 57 //{ return ((i<row) && (i>=0) && (j<col) && (j>=0)); } 58 { return ((((unsigned)i)<((unsigned)row)) && (((unsigned)j)<((unsigned)col))); } 57 59 inline int& operator[](int i) 58 60 { … … 87 89 inline int cols() const { return col; } 88 90 inline int rows() const { return row; } 89 inline void length(int l) { row = l; col = 1; }90 91 void show(int mat=0,int spaces=0) const; 91 92 #ifndef SING_NDEBUG … … 122 123 return m; 123 124 } 124 #if 0125 // TODO: no omalloc Bin (de-)/allocation?126 125 void* operator new ( size_t size ) 127 126 { … … 135 134 omFreeBin((ADDRESS)block, intvec_bin); 136 135 } 137 #endif138 136 // keiner (ausser obachman) darf das folgenden benutzen !!! 139 137 inline int * ivGetVec() { return v; } … … 143 141 if( o != NULL ) 144 142 return new intvec(o); 145 146 143 return NULL; 147 144 }
Note: See TracChangeset
for help on using the changeset viewer.