fieker-DuValspielwiese
Last change
on this file since f2b6f0b was
599326,
checked in by Kai Krüger <krueger@…>, 14 years ago
|
Anne, Kai, Frank:
- changes to #include "..." statements to allow cleaner build structure
- affected directories: omalloc, kernel, Singular
- not yet done: IntergerProgramming
git-svn-id: file:///usr/local/Singular/svn/trunk@13032 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
643 bytes
|
Rev | Line | |
---|
[f12ddcd] | 1 | #ifndef ITERATABLE_INTVEC_H |
---|
| 2 | #define ITERATABLE_INTVEC_H |
---|
| 3 | #include <vector> |
---|
[599326] | 4 | #include <kernel/intvec.h> |
---|
[f12ddcd] | 5 | class Intvec: public std::vector<int>{ |
---|
| 6 | public: |
---|
| 7 | Intvec(iterator first, |
---|
| 8 | iterator last, |
---|
| 9 | const allocator_type& __a = allocator_type()): |
---|
| 10 | std::vector<int>(first,last,__a){ |
---|
| 11 | } |
---|
| 12 | Intvec(int n=0):std::vector<int>(n){} |
---|
| 13 | Intvec(intvec& iv):std::vector<int>(iv.length()){ |
---|
| 14 | int n=iv.length(); |
---|
| 15 | for(int i=0;i<n;i++){ |
---|
| 16 | (*this)[i]=iv[i]; |
---|
| 17 | } |
---|
| 18 | } |
---|
| 19 | intvec* allocate_legacy_intvec_copy() const{ |
---|
| 20 | int s=size(); |
---|
| 21 | intvec* iv=new intvec(s); |
---|
| 22 | |
---|
| 23 | for(int i=0;i<s;i++){ |
---|
| 24 | (*iv)[i]=(*this)[i]; |
---|
| 25 | } |
---|
| 26 | return iv; |
---|
| 27 | } |
---|
| 28 | }; |
---|
| 29 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.