Utilities on HexColorSets. More...
Functions | |
bool | isValid (HexColorSet colorset) |
Returns true if colorset is a valid HexColorSet. | |
std::string | toString (HexColorSet colorset) |
Converts a HexColorSet to a string. | |
HexColorSet | fromString (std::string str) |
Converts a string into a HexColorSet. | |
bool | InSet (HexColor color, HexColorSet colorset) |
Returns true if color is in colorset. | |
HexColorSet | Only (HexColor color) |
Returns the HexColorSet composed only of color. | |
HexColorSet | NotColor (HexColor color) |
Returns the HexColorSet containing all but color. | |
HexColorSet | ColorOrEmpty (HexColor color) |
Returns the HexColorSet containing color or empty; equivalent to: |
Utilities on HexColorSets.
HexColorSet HexColorSetUtil::ColorOrEmpty | ( | HexColor | color | ) | [inline] |
Returns the HexColorSet containing color or empty; equivalent to:
NotColor(HexColorUtil::otherColor(color)).
Definition at line 263 of file HexColor.hpp.
References BLACK, EMPTY_ONLY, HexAssert, HexColorUtil::isValidColor(), NOT_BLACK, NOT_WHITE, and WHITE.
Referenced by VCBuilder::AddBaseVCs(), GraphUtils::ComputeDigraph(), Resistance::ComputeScores(), VCSetUtil::ComputeStatistics(), VCSetUtil::ConnectedTo(), and VCSetUtil::EqualOnGroups().
HexColorSet HexColorSetUtil::fromString | ( | std::string | str | ) | [inline] |
Converts a string into a HexColorSet.
Converts a string to a LogLevel.
Definition at line 206 of file HexColor.hpp.
References ALL_COLORS, BLACK_ONLY, EMPTY_ONLY, VC::FULL, HexAssert, LOG_LEVEL_ALL, LOG_LEVEL_CONFIG, LOG_LEVEL_FINE, LOG_LEVEL_FINER, LOG_LEVEL_INFO, LOG_LEVEL_OFF, LOG_LEVEL_SEVERE, LOG_LEVEL_WARNING, NOT_BLACK, NOT_EMPTY, NOT_WHITE, VC::SEMI, and WHITE_ONLY.
Referenced by HexProgram::InitLog(), and VCCommands::VCTypeArg().
bool HexColorSetUtil::InSet | ( | HexColor | color, | |
HexColorSet | colorset | |||
) | [inline] |
Returns true if color is in colorset.
Definition at line 220 of file HexColor.hpp.
References ALL_COLORS, BLACK, BLACK_ONLY, EMPTY, EMPTY_ONLY, HexAssert, isValid(), HexColorUtil::isValidColor(), NOT_BLACK, NOT_EMPTY, NOT_WHITE, WHITE, and WHITE_ONLY.
Referenced by Group::ComputeColorsetNbs(), ICEngine::ComputeDeadCaptured(), ICEngine::FillInMutualFillin(), ICEngine::FillinPermanentlyInferior(), ICEngine::FillInVulnerable(), GroupIterator::FindNextInColorSet(), and StoneBoard::Stones().
bool HexColorSetUtil::isValid | ( | HexColorSet | colorset | ) | [inline] |
Returns true if colorset is a valid HexColorSet.
Definition at line 187 of file HexColor.hpp.
References ALL_COLORS, and BLACK_ONLY.
Referenced by InSet(), and toString().
HexColorSet HexColorSetUtil::NotColor | ( | HexColor | color | ) | [inline] |
Returns the HexColorSet containing all but color.
Definition at line 251 of file HexColor.hpp.
References BLACK, HexAssert, HexColorUtil::isValidColor(), NOT_BLACK, NOT_EMPTY, NOT_WHITE, and WHITE.
Referenced by VCBuilder::andClosure(), VCBuilder::MergeAndShrink(), and VCBuilder::RemoveAllContaining().
HexColorSet HexColorSetUtil::Only | ( | HexColor | color | ) | [inline] |
Returns the HexColorSet composed only of color.
Definition at line 240 of file HexColor.hpp.
References BLACK, BLACK_ONLY, EMPTY_ONLY, HexAssert, HexColorUtil::isValidColor(), WHITE, and WHITE_ONLY.
Referenced by Groups::GroupIndex(), Groups::Nbs(), Groups::NumGroups(), and StoneBoard::Stones().
std::string HexColorSetUtil::toString | ( | HexColorSet | colorset | ) | [inline] |
Converts a HexColorSet to a string.
Definition at line 193 of file HexColor.hpp.
References BLACK_ONLY, EMPTY_ONLY, HexAssert, isValid(), NOT_BLACK, NOT_EMPTY, NOT_WHITE, and WHITE_ONLY.