OpenMD 3.1
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 70 of file SelectionSet.hpp.
|
inline |
Definition at line 73 of file SelectionSet.hpp.
OpenMD::SelectionSet::SelectionSet | ( | std::vector< int > | nbits | ) |
Definition at line 58 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 147 of file SelectionSet.cpp.
std::vector< bool > OpenMD::SelectionSet::any | ( | ) |
Returns true if any bits are set to true.
Definition at line 105 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 168 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 65 of file SelectionSet.cpp.
References countBits().
Referenced by countBits().
std::vector< int > OpenMD::SelectionSet::firstOffBit | ( | ) | const |
Definition at line 119 of file SelectionSet.cpp.
std::vector< int > OpenMD::SelectionSet::firstOnBit | ( | ) | const |
Definition at line 133 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 72 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 77 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 88 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 95 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 126 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 140 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 112 of file SelectionSet.cpp.
References none().
Referenced by none().
|
inline |
Definition at line 148 of file SelectionSet.hpp.
|
inline |
Definition at line 160 of file SelectionSet.hpp.
|
inline |
Definition at line 168 of file SelectionSet.hpp.
|
inline |
Definition at line 156 of file SelectionSet.hpp.
|
inline |
Definition at line 152 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 152 of file SelectionSet.cpp.
SelectionSet OpenMD::SelectionSet::parallelReduce | ( | ) |
Definition at line 227 of file SelectionSet.cpp.
void OpenMD::SelectionSet::resize | ( | std::vector< int > | nbits | ) |
Changes the size of SelectionSet.
Definition at line 185 of file SelectionSet.cpp.
References resize().
Referenced by resize().
void OpenMD::SelectionSet::setAll | ( | ) |
Definition at line 173 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 178 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 157 of file SelectionSet.cpp.
|
friend |
Definition at line 197 of file SelectionSet.cpp.
|
friend |
Definition at line 211 of file SelectionSet.cpp.
|
friend |
Definition at line 240 of file SelectionSet.cpp.
|
friend |
Definition at line 218 of file SelectionSet.cpp.
|
friend |
Definition at line 204 of file SelectionSet.cpp.
|
friend |
Definition at line 190 of file SelectionSet.cpp.
std::vector<OpenMDBitSet> OpenMD::SelectionSet::bitsets_ |
Definition at line 189 of file SelectionSet.hpp.