AFF --- A container for numbers (array) by Friederich and Forbriger.
dump_simplerigidarray.h
Go to the documentation of this file.
1 
37 // include guard
38 #ifndef AFF_DUMP_SIMPLERIGIDARRAY_H_VERSION
39 
40 #define AFF_DUMP_SIMPLERIGIDARRAY_H_VERSION \
41  "AFF_DUMP_SIMPLERIGIDARRAY_H V1.0 "
42 
43 #include<iostream>
44 #include<aff/lib/simplearray.h>
45 
46 namespace aff {
47 
48 using std::endl;
49 
54 template<class T, Tsize N>
55 void dump(const aff::SimpleRigidArray<T,N>& array, std::ostream& os=std::cout)
56 {
57  int i=0;
58  for (aff::Tsize k=0; k<N; k++)
59  {
60  if (!i) { os << " "; }
61  os.width(9);
62  os << array[k] << " ";
63  if (++i>7) { i=0; os << endl; }
64  }
65  os << endl;
66 }
67 
68 } // namespace aff
69 
70 #endif // AFF_DUMP_SIMPLERIGIDARRAY_H_VERSION (includeguard)
71 
72 /* ----- END OF dump_simplerigidarray.h ----- */
Root namespace of library.
Definition: array.h:148
void dump(const Strided &shape, std::ostream &os)
dump shape
Definition: dump.cc:49
A very basic rigid array class (with deep inline copy).
Definition: simplearray.h:94
a simple rigid array
size_t Tsize
Type to hold the size of an array dimension.
Definition: types.h:51