21 #include "SheafSystem/d_bin_coordinates.impl.h" 23 #include "SheafSystem/std_iostream.h" 41 require((rightmost_bit_id() <= xbit) && (xbit <= leftmost_bit_id()));
45 result = (_int_value[0] & lbranch_mask) ? 1 : 0;
49 ensure(result < degree());
63 require((rightmost_bit_id() <= xbit) && (xbit <= leftmost_bit_id()));
64 require(xbranch < degree());
69 int_type lnot_branch_mask = ~lbranch_mask;
72 (xbranch & 1) ? _int_value[0] | lbranch_mask : _int_value[0] & lnot_branch_mask;
76 ensure(branch(xbit) == xbranch);
92 require((rightmost_bit_id() <= xbit) && (xbit <= leftmost_bit_id()));
96 result = (_int_value[0] & lbranch_mask) ? 2 : 0;
97 result = (_int_value[1] & lbranch_mask) ? result + 1 : result;
101 ensure(result < degree());
115 require((rightmost_bit_id() <= xbit) && (xbit <= leftmost_bit_id()));
116 require(xbranch < degree());
121 int_type lnot_branch_mask = ~lbranch_mask;
124 (xbranch & 2) ? _int_value[0] | lbranch_mask : _int_value[0] & lnot_branch_mask;
126 (xbranch & 1) ? _int_value[1] | lbranch_mask : _int_value[1] & lnot_branch_mask;
130 ensure(branch(xbit) == xbranch);
146 require((rightmost_bit_id() <= xbit) && (xbit <= leftmost_bit_id()));
150 result = (_int_value[0] & lbranch_mask) ? 4 : 0;
151 result = (_int_value[1] & lbranch_mask) ? result + 2 : result;
152 result = (_int_value[2] & lbranch_mask) ? result + 1 : result;
156 ensure(result < degree());
170 require((rightmost_bit_id() <= xbit) && (xbit <= leftmost_bit_id()));
171 require(xbranch < degree());
176 int_type lnot_branch_mask = ~lbranch_mask;
179 (xbranch & 4) ? _int_value[0] | lbranch_mask : _int_value[0] & lnot_branch_mask;
181 (xbranch & 2) ? _int_value[1] | lbranch_mask : _int_value[1] & lnot_branch_mask;
183 (xbranch & 1) ? _int_value[2] | lbranch_mask : _int_value[2] & lnot_branch_mask;
187 ensure(branch(xbit) == xbranch);
203 require((rightmost_bit_id() <= xbit) && (xbit <= leftmost_bit_id()));
207 result = (_int_value[0] & lbranch_mask) ? 8 : 0;
208 result = (_int_value[1] & lbranch_mask) ? result +4 : result;
209 result = (_int_value[2] & lbranch_mask) ? result + 2 : result;
210 result = (_int_value[3] & lbranch_mask) ? result + 1 : result;
214 ensure(result < degree());
228 require((rightmost_bit_id() <= xbit) && (xbit <= leftmost_bit_id()));
229 require(xbranch < degree());
234 int_type lnot_branch_mask = ~lbranch_mask;
237 (xbranch & 8) ? _int_value[0] | lbranch_mask : _int_value[0] & lnot_branch_mask;
239 (xbranch & 4) ? _int_value[1] | lbranch_mask : _int_value[1] & lnot_branch_mask;
241 (xbranch & 2) ? _int_value[2] | lbranch_mask : _int_value[2] & lnot_branch_mask;
243 (xbranch & 1) ? _int_value[3] | lbranch_mask : _int_value[3] & lnot_branch_mask;
247 ensure(branch(xbit) == xbranch);
unsigned long long int_type
The type used for integer coordinates.
void put_branch(size_type xbit, size_type xbranch)
Set the branch index at bit position xbit to xbranch.
size_type branch(size_type xbit) const
The branch index at bit position xbit.
sheaf::size_type size_type
An unsigned integral type used to represent sizes and capacities.
Namespace for geometry component of sheaf system.