Changeset a82adc in git
- Timestamp:
- May 20, 2005, 5:33:19 PM (19 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- 9c979f4e2cecdbf0abbfc0a11628633d6c2c7d4d
- Parents:
- e6a01964d9be4bf183ccc3d4b259d99f1b15e31d
- Location:
- kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/intvec.cc
re6a019 ra82adc 2 2 * Computer Algebra System SINGULAR * 3 3 *****************************************/ 4 /* $Id: intvec.cc,v 1. 2 2004-05-27 12:05:41Singular Exp $ */4 /* $Id: intvec.cc,v 1.3 2005-05-20 15:33:18 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: class intvec: lists/vectors of integers … … 16 16 /*0 implementation*/ 17 17 18 18 // omBin intvec_bin = omGetSpecBin(sizeof(intvec)); 19 #if 0 19 20 intvec::intvec(intvec* iv) 20 21 { … … 27 28 } 28 29 } 30 #endif 29 31 30 32 intvec::intvec(int s, int e) … … 216 218 } 217 219 220 #if 0 218 221 intvec * ivCopy(intvec * o) 219 222 { … … 221 224 return iv; 222 225 } 226 #endif 223 227 224 228 intvec * ivAdd(intvec * a, intvec * b) -
kernel/intvec.h
re6a019 ra82adc 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: intvec.h,v 1. 4 2005-05-04 14:08:54Singular Exp $ */6 /* $Id: intvec.h,v 1.5 2005-05-20 15:33:19 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT: class intvec: lists/vectors of integers … … 11 11 #include "omalloc.h" 12 12 #include "febase.h" 13 14 15 //extern omBin intvec_bin; 13 16 14 17 class intvec … … 28 31 intvec(int s, int e); 29 32 intvec(int r, int c, int init); 30 intvec(intvec* iv); 33 intvec(intvec* iv) 34 { 35 row = iv->rows(); 36 col = iv->cols(); 37 v = (int *)omAlloc(sizeof(int)*row*col); 38 for (int i=row*col-1;i>=0; i--) 39 { 40 v[i] = (*iv)[i]; 41 } 42 } 31 43 32 44 void resize(int new_length); … … 80 92 return m; 81 93 } 94 #if 0 95 void* operator new ( size_t size ) 96 { 97 void* addr; 98 //omTypeAlloc(void*, addr, size); 99 addr=omAlloc0Bin(intvec_bin); 100 return addr; 101 } 102 void operator delete ( void* block ) 103 { //omfree( block ); 104 omFreeBin((ADDRESS)block, intvec_bin); 105 } 106 #endif 82 107 // keiner (ausser obachman) darf das folgenden benutzen !!! 83 108 inline int * ivGetVec() { return v; } 84 109 }; 85 intvec * ivCopy(intvec * o); 110 inline intvec * ivCopy(intvec * o) 111 { 112 intvec * iv=new intvec(o); 113 return iv; 114 } 115 86 116 intvec * ivAdd(intvec * a, intvec * b); 87 117 intvec * ivSub(intvec * a, intvec * b);
Note: See TracChangeset
for help on using the changeset viewer.