diff options
| author | Cliff Click <cliffc@acm.org> | 2023-09-18 16:52:59 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2023-09-18 16:52:59 -0700 |
| commit | bb1a8771e7635b3e688f35b46453e1ae5d07147c (patch) | |
| tree | 0b34bb0c8ddb42450b7d13efce17838cc0397a8b /chapter01/src/main | |
| parent | b1d28a7d1d7996aaaef67b7823725c47e97a7d88 (diff) | |
| parent | 7e0b33067d83348b87652261845c2f40823012c7 (diff) | |
| download | Simple-bb1a8771e7635b3e688f35b46453e1ae5d07147c.tar.gz Simple-bb1a8771e7635b3e688f35b46453e1ae5d07147c.zip | |
Merge branch 'main' of https://github.com/dibyendumajumdar/Simple into pr/2
Diffstat (limited to 'chapter01/src/main')
| -rw-r--r-- | chapter01/src/main/java/com/seaofnodes/simple/node/Node.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/chapter01/src/main/java/com/seaofnodes/simple/node/Node.java b/chapter01/src/main/java/com/seaofnodes/simple/node/Node.java index bafa58f4..f817db52 100644 --- a/chapter01/src/main/java/com/seaofnodes/simple/node/Node.java +++ b/chapter01/src/main/java/com/seaofnodes/simple/node/Node.java @@ -33,7 +33,6 @@ public abstract class Node { * input. These nodes are users of this node, thus these are def-use * references to Nodes. * <p> - * Outputs directly match inputs, making a directed graph that can be * walked in either direction. These outputs are typically used for * efficient optimizations but otherwise have no semantics meaning. @@ -67,6 +66,11 @@ public abstract class Node { public int nIns() { return _inputs.size(); } + /** + * Gets the ith output node + * @param i Offset of the output node + * @return Output node (not null) + */ public Node out(int i) { return _outputs.get(i); } public int nOuts() { return _outputs.size(); } |
