Definition at line 93 of file IncrTopoSortTest.cpp.
◆ Graph()
◆ addEdge()
void Graph::addEdge |
( |
Node * |
dependedOn, |
|
|
Node * |
dependent |
|
) |
| |
|
inline |
Definition at line 111 of file IncrTopoSortTest.cpp.
111 {
112
113
116 }
void addEdges(SkTDArray< Node * > *dependedOn, Node *dependent)
◆ addEdges()
Definition at line 133 of file IncrTopoSortTest.cpp.
133 {
134 this->validate();
135
136
137 for (
int i = 0;
i < dependedOn->
size(); ++
i) {
138 if ((*dependedOn)[
i]->indexInSort() < dependent->
indexInSort()) {
139 dependent->addDependency((*dependedOn)[
i]);
142 } else {
143 dependent->addDependency((*dependedOn)[
i]);
144 }
145 }
146
147 if (dependedOn->
empty()) {
148 return;
149 }
150
151
152
153
154
156
157
158
159
160 int lowerBound = fNodes.
size();
161 for (
int i = 0;
i < dependedOn->
size(); ++
i) {
162 if ((*dependedOn)[
i]->indexInSort() < lowerBound) {
163 this->shift(lowerBound);
164 }
165
167 this->dfs(dependent, (*dependedOn)[
i]->indexInSort());
168 }
169
171 }
172
173 this->shift(lowerBound);
174
175 this->validate();
176 }
void removeShuffle(int index)
static float min(float r, float g, float b)
static bool CompareIndicesGT(Node *const &a, Node *const &b)
◆ addNode()
Node * Graph::addNode |
( |
uint32_t |
id | ) |
|
|
inline |
Definition at line 100 of file IncrTopoSortTest.cpp.
100 {
101 this->validate();
103
105 tmp->setIndexInSort(fNodes.
size()-1);
106 this->validate();
107 return tmp.get();
108 }
◆ getActual()
void Graph::getActual |
( |
SkString * |
actual | ) |
const |
|
inline |
Definition at line 179 of file IncrTopoSortTest.cpp.
179 {
180 this->validate();
181
182 for (
int i = 0;
i < fNodes.
size(); ++
i) {
183 (*actual) += fNodes[
i]->id();
184 if (
i < fNodes.
size()-1) {
185 (*actual) += ',';
186 }
187 }
188 }
The documentation for this class was generated from the following file: