Go to the documentation of this file.
40 int main(
int argc,
char *argv[])
49 Info<<
"\nalternating bit pattern\n";
54 Info<<
"\ncomplementary bit pattern\n";
63 Info<<
"\nalternating bit pattern\n";
69 for (
label i=0; i < 4; ++i)
74 Info<<
"\nresized with false, 6 true + 6 false, bottom 4 bits true\n";
79 Info<<
"\noperator|\n";
84 (list1 | list2).printBits(
Info);
86 Info<<
"\noperator& : does trim\n";
87 (list1 & list2).printBits(
Info);
89 Info<<
"\noperator^\n";
90 (list1 ^ list2).printBits(
Info);
93 Info<<
"\noperator|=\n";
96 (list3 |= list2).printBits(
Info);
99 Info<<
"\noperator|= with labelUList\n";
102 (list3 |= list2Labels).printBits(
Info);
105 Info<<
"\noperator&=\n";
108 (list3 &= list2).printBits(
Info);
111 Info<<
"\noperator+=\n";
114 (list3 += list2).printBits(
Info);
117 Info<<
"\noperator+= with labelUList\n";
120 (list3 += list2Labels).printBits(
Info);
123 Info<<
"\noperator-=\n";
126 (list3 -= list2).printBits(
Info);
129 Info<<
"\noperator-= with labelUList\n";
132 (list3 -= list2Labels).printBits(
Info);
139 "(1 n 1 n 1 n 1 1 off 0 0 f f 0 y yes y true y false on t)"
143 Info<<
"\ntest Istream constructor\n";
148 Info<<
"\nassign from labelList\n";
153 "(0 1 2 3 12 13 14 19 20 21)"
160 Info<<
"\nassign from indices\n";
165 "{0 1 2 3 12 13 14 19 20 21}"
176 boolLst[i] = list4[i];
179 Info<<
"List<bool>: " << boolLst <<
endl;
187 "{(0 3)(1 3)(2 3)(3 3)(12 3)(13 3)(14 3)(19 3)(20 3)(21 3)}"
191 Info<<
"roundabout assignment: " << pl2 <<
endl;
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
List< label > labelList
A List of labels.
#define forAll(list, i)
Loop across all elements in list.
Ostream & printBits(Ostream &, const bool fullOutput=false) const
Print bit patterns, optionally output unused elements.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void writeEntry(Ostream &) const
Write as a dictionary entry.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Input from memory buffer stream.
Ostream & printInfo(Ostream &, const bool fullOutput=false) const
Print information and bit patterns (with printBits)
int main(int argc, char *argv[])
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Istream & read(Istream &)
Clear list and read from stream.
Ostream & write(Ostream &, const bool indexedOutput=false) const
Write, optionally with indexedOutput.
void resize(const label, const unsigned int &val=0u)
Reset addressable list size, does not shrink the allocated size.
label size() const
Number of entries.
Xfer< labelList > used() const
Return indices of the used (true) elements as a list of labels.
void clear()
Clear the list, i.e. set addressable size to zero.