package modules.region;

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

/*
  A latched region simply holds its current state, not propagating
 */

public class NodeRegion implements RegionMembershipTest {
  Object nid; double penumbra=2.0;
  public NodeRegion(Object nid) { this.nid=nid; }
  public NodeRegion(Object nid, double pu) { this.nid=nid; penumbra=pu; }
  public boolean isMember(PortedProcessor pp) {
    PersistentNodeB pn = (PersistentNodeB)pp.getModule("PersistentNode");
    return pn.inNode(nid,penumbra);
  }
}
