1 # include "rheolef/disarray.h"
22 # include "rheolef/load_chunk.h"
27 template <
class T,
class A>
33 template <
class T,
class A>
35 :
base(loc_size1, init_val, alloc),
39 template <
class T,
class A>
41 :
base(ownership.size(),init_val),
45 template <
class T,
class A>
48 _ownership(x._ownership)
50 std::copy (x.
begin(), x.
end(), begin());
52 template <
class T,
class A>
57 _ownership = ownership;
58 base::resize (_ownership.size(), init_val);
59 std::fill (begin(), end(), init_val);
61 template <
class T,
class A>
67 base::resize (_ownership.size(), init_val);
68 std::fill (begin(), end(), init_val);
70 template <
class T,
class A>
71 template <
class GetFunction>
74 std::istream& is = ips.is();
75 if (!
load_chunk (is, begin(), end(), get_element))
79 template <
class T,
class A>
85 template <
class T,
class A>
86 template <
class PutFunction>
90 std::ostream& os = ops.
os();
92 put_element (os,
operator[](i));
97 template <
class T,
class A>
103 template <
class T,
class A>
111 template <
class T,
class A>
114 std::ofstream os (
name.c_str());
115 std::cerr <<
"! file \"" <<
name <<
"\" created." << std::endl;
119 template <
class T,
class A>
125 check_macro (inew2iold.size() == size(),
"reverse permutation[0:"<<inew2iold.size()
126 <<
"[ has incompatible dis_range with oriinal permutation[0:"<<size()<<
"[");
127 for (
size_type iold = 0, nold = size(); iold < nold; iold++) {
129 inew2iold [inew] = iold;
132 template <
class T,
class A>
base::size_type size_type
see the distributor page for the full documentation
static const size_type decide
odiststream: see the diststream page for the full documentation
#define error_macro(message)
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
verbose clean transpose logscale grid shrink ball stereo iso volume skipvtk deformation fastfieldload lattice reader_on_stdin color format format format format format format format format format format format format format format format format format format dump
This file is part of Rheolef.
bool load_chunk(std::istream &s, RandomIterator iter, RandomIterator last)
disarray element input helper
disarray element output helper