package modules.node;

import utils.*;
import simulator.*;
import modules.gradient.*;
import java.util.*;

public class NodePropagation implements PropagationTest {
  private Object id;
  private double pu;
  public NodePropagation(Object id) { this.id=id; pu=1.0; }
  public NodePropagation(Object id, double pu) { this.id=id; this.pu=pu; }

  public boolean propagate(Gradient g, PortedProcessor pp) {
    PersistentNodeB pn = (PersistentNodeB)pp.getModule("PersistentNode");
    return pn.inNode(id,pu);
  }
}
