s/in_index/input_index/
This commit is contained in:
parent
ef9ae8581f
commit
afbf6c8246
@ -7,11 +7,11 @@ pub struct DagId {
|
||||
}
|
||||
|
||||
impl DagId {
|
||||
pub fn from_in_index(n: NodeIndex) -> Self {
|
||||
pub fn from_input_index(n: NodeIndex) -> Self {
|
||||
DagId { index: n.0 as u32 }
|
||||
}
|
||||
|
||||
pub fn as_in_index(&self) -> NodeIndex {
|
||||
pub fn as_input_index(&self) -> NodeIndex {
|
||||
NodeIndex(self.index as usize)
|
||||
}
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ impl<'q, N, I, O> GraphReduce<'q, N, I, O>
|
||||
// correspond to the indices from the input graph
|
||||
for i in 0..in_graph.len_nodes() {
|
||||
let k = unify.new_key(());
|
||||
assert!(k == DagId::from_in_index(NodeIndex(i)));
|
||||
assert!(k == DagId::from_input_index(NodeIndex(i)));
|
||||
}
|
||||
|
||||
GraphReduce { in_graph, unify, is_input, is_output }
|
||||
@ -105,8 +105,8 @@ impl<'q, N, I, O> GraphReduce<'q, N, I, O>
|
||||
}
|
||||
|
||||
fn mark_cycle(&mut self, in_node1: NodeIndex, in_node2: NodeIndex) {
|
||||
let dag_id1 = DagId::from_in_index(in_node1);
|
||||
let dag_id2 = DagId::from_in_index(in_node2);
|
||||
let dag_id1 = DagId::from_input_index(in_node1);
|
||||
let dag_id2 = DagId::from_input_index(in_node2);
|
||||
self.unify.union(dag_id1, dag_id2);
|
||||
}
|
||||
|
||||
@ -114,8 +114,8 @@ impl<'q, N, I, O> GraphReduce<'q, N, I, O>
|
||||
/// be a no-op unless `in_node` participates in a cycle, in which
|
||||
/// case a distinct node *may* be returned.
|
||||
fn cycle_head(&mut self, in_node: NodeIndex) -> NodeIndex {
|
||||
let i = DagId::from_in_index(in_node);
|
||||
self.unify.find(i).as_in_index()
|
||||
let i = DagId::from_input_index(in_node);
|
||||
self.unify.find(i).as_input_index()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user