extension/src/main/java/org/justinnk/masonssa/extension/ssa/EdgeDependencyGraph.java
/**
   * Get all candidate actions, whose guard or rate might be affected by the addition of an edge.
   *
   * @param newEdge The edge added. Only those actions are considered that depend on an edge that
   *     shares a node with the new edge.
   * @param owner The network this edge belongs to.
   * @return A list of all actions that potentially need to be updated.
   */
Get all candidate actions, whose guard or rate might be affected by the addition of an edge.
@param newEdge The edge added. Only those actions are considered that depend on an edge that
shares a node with the new edge.
@param owner The network this edge belongs to.
@return A list of all actions that potentially need to be updated.
Get all candidate actions whose guard or rate might be affected by the addition of an edge . @param newEdge The edge added . Only those actions are considered that depend on an edge that shares a node with the new edge . @param owner The network this edge belongs to . @return A list of all actions that potentially need to be updated .
public ArrayList<Action> GetNewDependentCandidates(Edge newEdge, Network owner) {
    ArrayList<Action> result = new ArrayList<>();
    /* Get all actions that depend on the network */
    ArrayList<Action> networkDependents = GetDependents(owner);
    for (Action dep : networkDependents) {
      /* Get the edges this action depends on */
      HashSet<Edge> dependencies = dependsOn.get(dep).get(owner);
      for (Edge edep : dependencies) {
        /* If any of the edges shares a node with the new edge, add it to the result */
        if (edep.getFrom() == newEdge.getFrom()
            || edep.getTo() == newEdge.getFrom()
            || edep.getFrom() == newEdge.getTo()
            || edep.getTo() == newEdge.getTo()) {
          result.add(dep);
          break;
        }
      }
    }
    return result;
  }
public ArrayList < Action > GetNewDependentCandidates ( Edge newEdge , Network owner ) { ArrayList < Action > result = new ArrayList < > ( ) ; /* Get all actions that depend on the network */ ArrayList < Action > networkDependents = GetDependents ( owner ) ; for ( Action dep : networkDependents ) { /* Get the edges this action depends on */ HashSet < Edge > dependencies = dependsOn . get ( dep ) . get ( owner ) ; for ( Edge edep : dependencies ) { /* If any of the edges shares a node with the new edge, add it to the result */ if ( edep . getFrom ( ) == newEdge . getFrom ( ) || edep . getTo ( ) == newEdge . getFrom ( ) || edep . getFrom ( ) == newEdge . getTo ( ) || edep . getTo ( ) == newEdge . getTo ( ) ) { result . add ( dep ) ; break ; } } } return result ; }
Get all candidate actions, whose guard or rate might be affected by the addition of an edge.
Get all candidate actions whose guard or rate might be affected by the addition of an edge .