MCPcopy Create free account
hub / github.com/BirolLab/abyss / Support

Class Support

RResolver/RAlgorithmsShort.h:92–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92class Support
93{
94 public:
95
96 enum class UnknownReason : uint8_t {
97 UNDETERMINED = 0, // Not yet processed
98 TOO_MANY_COMBINATIONS, // Branching out exploded beyond a threshold
99 OVER_MAX_TESTS, // Planned tests was above the threshold
100 POSSIBLE_TESTS_LT_PLANNED, // Planned tests could not be carried out due to low coverage
101 WINDOW_NOT_LONG_ENOUGH, // Window too small / repeat too large to all the planned tests
102 HEAD_SHORTER_THAN_MARGIN, // One of the branches to the left was too short for planned tests
103 TAIL_SHORTER_THAN_MARGIN, // One of the branches to the right was too short for planned tests
104 DIFFERENT_CULPRIT // The path was fine, but another path in this repeat was unknown so all the paths
105 // for this repeat became unknown
106 };
107
108 Support() = default;
109
110 Support(UnknownReason unknownReason): unknownReason(unknownReason) {};
111
112 Support(int calculatedTests, UnknownReason unknownReason)
113 : found(-1)
114 , tests(-1)
115 , unknownReason(unknownReason)
116 {
117 assert(calculatedTests >= 0);
118 if (calculatedTests > std::numeric_limits<decltype(this->calculatedTests)>::max()) { this->calculatedTests = std::numeric_limits<decltype(this->calculatedTests)>::max(); } else {
119 this->calculatedTests = calculatedTests;
120 }
121 }
122
123 Support(int8_t found, int8_t tests)
124 : found(found)
125 , tests(tests)
126 {
127 assert(found >= 0);
128 assert(tests > 0);
129 assert(calculatedTests == -1);
130 }
131
132 Support(int8_t found, int8_t tests, int calculatedTests)
133 : found(found)
134 , tests(tests)
135 {
136 assert(found >= 0);
137 assert(tests > 0);
138 assert(calculatedTests >= 0);
139 if (calculatedTests > std::numeric_limits<decltype(this->calculatedTests)>::max()) { this->calculatedTests = std::numeric_limits<decltype(this->calculatedTests)>::max(); } else {
140 this->calculatedTests = calculatedTests;
141 }
142 }
143
144 bool unknown() const { return tests == -1; }
145
146 void reset()
147 {
148 found = -1;
149 tests = -1;

Callers 3

testSequenceFunction · 0.85
testCombinationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected