Skip to content
Newer
Older
100644 30 lines (23 sloc) 649 Bytes
a9461cd initializing repo from version 0.10.2 minus the example files
Julian authored Feb 23, 2012
1 #ifndef INCLUDE_BLASSIC_DIM_H
2 #define INCLUDE_BLASSIC_DIM_H
3
4 // dim.h
5 // Revision 6-jul-2004
6
7 #include <iostream>
8 #include <cstddef>
9 #include <vector>
10
11 class Dimension {
12 public:
13 void add (size_t n) { dim.push_back (n); }
14 size_t size () const { return dim.size (); }
15 bool empty () const { return dim.empty (); }
16 size_t elements () const;
17 size_t operator [] (size_t n) const { return dim [n]; }
18 size_t evalpos (const Dimension & d) const;
19 bool operator == (const Dimension & d) const
20 { return dim == d.dim; }
21 private:
22 std::vector <size_t> dim;
23 };
24
25 std::ostream & operator << (std::ostream & os, const Dimension & d);
26
27 #endif
28
29 // Fin de dim.h
Something went wrong with that request. Please try again.