> On July 23, 2019, 8:17 p.m., Aadarsh Jajodia wrote:
> > Can we use a simple adjacency list to represent the graph. Something like a
> > Map<String, List<String> > to represent the graph. And also I feel we can
> > just use a visited set and stack to maintain the topological order? Maybe
> > that's simpler?
Also for the toplogocial sort using the stack, you could follow this approach.
void topologicalSort(string vertex) {
visited.add(vertex);
for (neighbor in vertex) {
if(!visited[neighbor]) topologicalSort(neighbor)
}
stack.push(vertex);
}
We can pop all the elements in the stack and that should give the answer.
- Aadarsh
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71127/#review216812
-----------------------------------------------------------
On July 19, 2019, 6:49 p.m., Merryle Wang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71127/
> -----------------------------------------------------------
>
> (Updated July 19, 2019, 6:49 p.m.)
>
>
> Review request for atlas, Ashutosh Mestry, Aadarsh Jajodia, Sridhar K, Le Ma,
> Madhan Neethiraj, and Sarath Subramanian.
>
>
> Repository: atlas
>
>
> Description
> -------
>
> ATLAS-3343: Ordering of dynAttr evaluation
>
>
> Diffs
> -----
>
> intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java
> 23eaa0a2e88fd348d2347314170726ebb5cb4393
>
>
> Diff: https://reviews.apache.org/r/71127/diff/1/
>
>
> Testing
> -------
>
> Created dummy dynamic attributes to test the correct ordering.
>
>
> Thanks,
>
> Merryle Wang
>
>