|
OpenMD 3.2
Molecular Dynamics in the Open
|
Public Member Functions | |
| SelectionSet (std::vector< int > nbits) | |
| std::vector< int > | countBits () |
| Returns the number of bits set to true in this SelectionSet. | |
| void | flip (std::vector< int > bitIndex) |
| Sets the bit at the specified index to to the complement of its current value. | |
| void | flip (std::vector< int > fromIndex, std::vector< int > toIndex) |
| Sets each bit from the specified fromIndex(inclusive) to the specified toIndex(exclusive) to the complement of its current value. | |
| void | flip () |
| Sets each bit to the complement of its current value. | |
| std::vector< bool > | get (std::vector< int > bitIndex) |
| Returns the value of the bit with the specified index. | |
| SelectionSet | get (std::vector< int > fromIndex, std::vector< int > toIndex) |
| Returns a new SelectionSet composed of bits from this SelectionSet from fromIndex(inclusive) to toIndex(exclusive). | |
| std::vector< bool > | any () |
| Returns true if any bits are set to true. | |
| std::vector< bool > | none () |
| Returns true if no bits are set to true. | |
| std::vector< int > | firstOffBit () const |
| std::vector< int > | nextOffBit (std::vector< int > fromIndex) const |
| Returns the index of the first bit that is set to false that occurs on or after the specified starting index. | |
| std::vector< int > | firstOnBit () const |
| std::vector< int > | nextOnBit (std::vector< int > fromIndex) const |
| Returns the index of the first bit that is set to true that occurs on or after the specified starting index. | |
| void | andOperator (const SelectionSet &bs) |
| Performs a logical AND of this target bit set with the argument bit set. | |
| void | orOperator (const SelectionSet &bs) |
| Performs a logical OR of this bit set with the bit set argument. | |
| void | xorOperator (const SelectionSet &bs) |
| Performs a logical XOR of this bit set with the bit set argument. | |
| void | setBitOn (std::vector< int > bitIndex) |
| void | setBitOff (std::vector< int > bitIndex) |
| void | clearAll () |
| Sets all of the bits in this SelectionSet to false. | |
| void | setAll () |
| std::vector< int > | size () const |
| Returns the number of bits of space actually in use by this SelectionSet to represent bit values. | |
| void | resize (std::vector< int > nbits) |
| Changes the size of SelectionSet. | |
| SelectionSet & | operator&= (const SelectionSet &ss) |
| SelectionSet & | operator|= (const SelectionSet &ss) |
| SelectionSet & | operator^= (const SelectionSet &ss) |
| SelectionSet & | operator-= (const SelectionSet &ss) |
| SelectionSet | parallelReduce () |
| std::vector< bool > | operator[] (std::vector< int > bitIndex) const |
Public Attributes | |
| std::vector< OpenMDBitSet > | bitsets_ |
Friends | |
| SelectionSet | operator| (const SelectionSet &bs1, const SelectionSet &bs2) |
| SelectionSet | operator& (const SelectionSet &bs1, const SelectionSet &bs2) |
| SelectionSet | operator^ (const SelectionSet &bs1, const SelectionSet &bs2) |
| SelectionSet | operator- (const SelectionSet &bs1, const SelectionSet &bs2) |
| bool | operator== (const SelectionSet &bs1, const SelectionSet &bs2) |
| std::ostream & | operator<< (std::ostream &os, const SelectionSet &bs) |
Definition at line 73 of file SelectionSet.hpp.
|
inline |
Definition at line 76 of file SelectionSet.hpp.
| OpenMD::SelectionSet::SelectionSet | ( | std::vector< int > | nbits | ) |
Definition at line 61 of file SelectionSet.cpp.
| void OpenMD::SelectionSet::andOperator | ( | const SelectionSet & | bs | ) |
Performs a logical AND of this target bit set with the argument bit set.
Definition at line 150 of file SelectionSet.cpp.
| std::vector< bool > OpenMD::SelectionSet::any | ( | ) |
Returns true if any bits are set to true.
Definition at line 108 of file SelectionSet.cpp.
References any().
Referenced by any().
| void OpenMD::SelectionSet::clearAll | ( | ) |
Sets all of the bits in this SelectionSet to false.
Definition at line 171 of file SelectionSet.cpp.
References clearAll().
Referenced by clearAll().
| std::vector< int > OpenMD::SelectionSet::countBits | ( | ) |
Returns the number of bits set to true in this SelectionSet.
Definition at line 68 of file SelectionSet.cpp.
References countBits().
Referenced by countBits().
| std::vector< int > OpenMD::SelectionSet::firstOffBit | ( | ) | const |
Definition at line 122 of file SelectionSet.cpp.
| std::vector< int > OpenMD::SelectionSet::firstOnBit | ( | ) | const |
Definition at line 136 of file SelectionSet.cpp.
| void OpenMD::SelectionSet::flip | ( | ) |
| void OpenMD::SelectionSet::flip | ( | std::vector< int > | bitIndex | ) |
Sets the bit at the specified index to to the complement of its current value.
Definition at line 75 of file SelectionSet.cpp.
References flip().
| void OpenMD::SelectionSet::flip | ( | std::vector< int > | fromIndex, |
| std::vector< int > | toIndex ) |
Sets each bit from the specified fromIndex(inclusive) to the specified toIndex(exclusive) to the complement of its current value.
Definition at line 80 of file SelectionSet.cpp.
References flip().
| std::vector< bool > OpenMD::SelectionSet::get | ( | std::vector< int > | bitIndex | ) |
Returns the value of the bit with the specified index.
Definition at line 91 of file SelectionSet.cpp.
References get().
Referenced by get().
| SelectionSet OpenMD::SelectionSet::get | ( | std::vector< int > | fromIndex, |
| std::vector< int > | toIndex ) |
Returns a new SelectionSet composed of bits from this SelectionSet from fromIndex(inclusive) to toIndex(exclusive).
Definition at line 98 of file SelectionSet.cpp.
| std::vector< int > OpenMD::SelectionSet::nextOffBit | ( | std::vector< int > | fromIndex | ) | const |
Returns the index of the first bit that is set to false that occurs on or after the specified starting index.
Definition at line 129 of file SelectionSet.cpp.
References nextOffBit().
Referenced by nextOffBit().
| std::vector< int > OpenMD::SelectionSet::nextOnBit | ( | std::vector< int > | fromIndex | ) | const |
Returns the index of the first bit that is set to true that occurs on or after the specified starting index.
Definition at line 143 of file SelectionSet.cpp.
References nextOnBit().
Referenced by nextOnBit().
| std::vector< bool > OpenMD::SelectionSet::none | ( | ) |
Returns true if no bits are set to true.
Definition at line 115 of file SelectionSet.cpp.
References none().
Referenced by none().
|
inline |
Definition at line 151 of file SelectionSet.hpp.
|
inline |
Definition at line 163 of file SelectionSet.hpp.
|
inline |
Definition at line 171 of file SelectionSet.hpp.
|
inline |
Definition at line 159 of file SelectionSet.hpp.
|
inline |
Definition at line 155 of file SelectionSet.hpp.
| void OpenMD::SelectionSet::orOperator | ( | const SelectionSet & | bs | ) |
Performs a logical OR of this bit set with the bit set argument.
Definition at line 155 of file SelectionSet.cpp.
| SelectionSet OpenMD::SelectionSet::parallelReduce | ( | ) |
Definition at line 230 of file SelectionSet.cpp.
| void OpenMD::SelectionSet::resize | ( | std::vector< int > | nbits | ) |
Changes the size of SelectionSet.
Definition at line 188 of file SelectionSet.cpp.
References resize().
Referenced by resize().
| void OpenMD::SelectionSet::setAll | ( | ) |
Definition at line 176 of file SelectionSet.cpp.
| std::vector< int > OpenMD::SelectionSet::size | ( | ) | const |
Returns the number of bits of space actually in use by this SelectionSet to represent bit values.
Definition at line 181 of file SelectionSet.cpp.
References size().
Referenced by size().
| void OpenMD::SelectionSet::xorOperator | ( | const SelectionSet & | bs | ) |
Performs a logical XOR of this bit set with the bit set argument.
Definition at line 160 of file SelectionSet.cpp.
|
friend |
Definition at line 200 of file SelectionSet.cpp.
|
friend |
Definition at line 214 of file SelectionSet.cpp.
|
friend |
Definition at line 243 of file SelectionSet.cpp.
|
friend |
Definition at line 221 of file SelectionSet.cpp.
|
friend |
Definition at line 207 of file SelectionSet.cpp.
|
friend |
Definition at line 193 of file SelectionSet.cpp.
| std::vector<OpenMDBitSet> OpenMD::SelectionSet::bitsets_ |
Definition at line 192 of file SelectionSet.hpp.