CNORXZ
Container with Native Operation Routines and Expressions
Loading...
Searching...
No Matches
index_format.cc
Go to the documentation of this file.
1// -*- C++ -*-
12#include "ranges/index_format.h"
13
14namespace CNORXZ
15{
17 mB(b)
18 {}
19
21 {
22 return mB;
23 }
24
26 {
27 return mB.size();
28 }
29
30 const UPos& YFormat::get(SizeT i) const
31 {
32 return mB[i];
33 }
34
36 {
37 return mB[i];
38 }
39
41 {
42 CXZ_ASSERT(f.size() == s.size(), "got vectors with different size ("
43 << f.size() << " vs " << s.size() << ")");
44 SizeT x = 1;
45 for(SizeT i_ = f.size(); i_ != 0; --i_) {
46 const SizeT i = i_-1;
47 if(f[i] != x) {
48 return false;
49 }
50 x *= s[i];
51 }
52 return true;
53 }
54}
#define CXZ_ASSERT(statement, errmsg)
Definition assert.h:40
const UPos & get(CSizeT< I > i) const
YFormat(const Vector< UPos > &b)
const UPos & operator[](CSizeT< I > i) const
const Vector< UPos > & all() const
SizeT size() const
Index formats declaration.
uint64_t SizeT
Definition types.h:38
std::vector< T, Allocator< T > > Vector
Definition types.h:310
Sptr< Range > rangeCast(const RangePtr r)
bool formatIsTrivial(const Vector< SizeT > &f, const Vector< SizeT > &s)