Package hec.rss.model

Class ElementGraph

java.lang.Object
hec.rss.model.ElementGraph

public class ElementGraph extends Object
Utility class used in element ordering for RssSytem compute method
  • Field Details

  • Constructor Details

    • ElementGraph

      public ElementGraph()
    • ElementGraph

      public ElementGraph(MessagePrinter mp, int level)
  • Method Details

    • setMessagePrinter

      public void setMessagePrinter(MessagePrinter mp, int level)
    • addElement

      public ElementGraph.ElementGraphNode addElement(Element e, int actElemId)
    • containsElement

      public boolean containsElement(Element e)
    • addDependentElem

      public void addDependentElem(Element elem, Element lastElem, String descr)
      sets dependency between elements. This method should be called after all elements are added to the graph and before calling the sort method.
      Parameters:
      elem -
      lastElem -
    • getGraphNodesBelow

    • isCyclicGraph

      public boolean isCyclicGraph()
      Tests to determine if the graph is cyclic by walking down from each top node and looking for graph nodes that are visited more than once.
      Returns:
      true if the graph is cyclic
    • createDependentGroups

      public void createDependentGroups()
    • sort

      public boolean sort()
      Sort the ElementGraph elements and subgraphs in hydrologic order.
      Returns:
      true if successful
    • getUpNodeList

      public List<ElementGraph.ElementGraphNode> getUpNodeList()
    • getRootNodes

      public List<ElementGraph.ElementGraphNode> getRootNodes()
    • getElementOrder

      public int[] getElementOrder()
    • getIterationBlocks

      public Vector<IterationBlock> getIterationBlocks()
    • getBlockId

      public int getBlockId()
      Returns:
    • getDistId

      public int getDistId()
    • trimGraphToContaining

      public void trimGraphToContaining(Element[] elemArray)
      Trims this element graph so that it only contains subgraphs that include the given elements by cloning this graph and removing unneeded parts
      Parameters:
      _resArray -
    • writeGraph

      public void writeGraph(String message)
      Print element graph details to previously defined MessagePrinter log
      Parameters:
      message - string printed on first line