hydroScalingAPI.util.randomSelfSimilarNetworks
Class RsnStructure

java.lang.Object
  extended by hydroScalingAPI.util.randomSelfSimilarNetworks.RsnStructure

public class RsnStructure
extends java.lang.Object

Manages information related to the topologic and geometric information associated to a Random Self-similar Network.

Author:
Ricardo Mantilla

Constructor Summary
RsnStructure(java.io.File theFile)
          Creates a new instance of RsnStructure previously stored in a file
RsnStructure(int generations, DiscreteDistribution myDis_I, DiscreteDistribution myDis_E)
          Creates a new instance of RsnStructure.
RsnStructure(int generations, DiscreteDistribution myDis_I, DiscreteDistribution myDis_E, ContinuousDistribution myDis_Areas_E, ContinuousDistribution myDis_Areas_I)
          Creates a new instance of RsnStructure
RsnStructure(int generations, ScaleDependentDiscreteDistribution myDis_I, ScaleDependentDiscreteDistribution myDis_E)
          Creates a new instance of RsnStructure.
 
Method Summary
 int[] getCompleteStreamLinksArray()
          Returns an array with the index of the links that correspond to the bottom of complete order streams
 int[][] getConnectionStructure()
          Returns the array describing the topologic connection structure of the links in the network
 float[][] getHortonOrders()
          Returns an array with the links Strahler order
 float[][] getLinkAreas()
          Returns an array with the links catchment area
 float[][] getLinkLengths()
          Returns an array with the links geometric length
 float[][] getLongestLength()
          Returns an array with the links upstream longest channel lenght
 int[] getMagnitudes()
          Returns an array with the links Shreve's magnitude
 int getNetworkOrder()
          Returns the Strahler order of the RSN
 int[] getNextLinkArray()
          Returns an array with the index of the downstream link
 float[][] getUpAreas()
          Returns an array with the links upstream area
 float[][] getUpLength()
          Returns an array with the links upstream total length
static void main(java.lang.String[] args)
          Tests for the class
 void writeRsnTreeDecoding(java.io.File theFile)
          Writes the RSN topologic and geometric structure to a file for later retreival and reconstruction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RsnStructure

public RsnStructure(int generations,
                    DiscreteDistribution myDis_I,
                    DiscreteDistribution myDis_E,
                    ContinuousDistribution myDis_Areas_E,
                    ContinuousDistribution myDis_Areas_I)
Creates a new instance of RsnStructure

Parameters:
generations - The number of generations of the RSN (number of recursive replacements)
myDis_I - A random variable with and associated probability distribution of the number of descendents of interior nodes
myDis_E - A random variable with and associated probability distribution of the number of descendents of exterioir nodes
myDis_Areas_E - A random variable with and associated probability distribution of the catchment area associated to each link in the RSN
myDis_Areas_I - A random variable with and associated probability distribution of the geometric length associated to each link in the RSN

RsnStructure

public RsnStructure(int generations,
                    DiscreteDistribution myDis_I,
                    DiscreteDistribution myDis_E)
Creates a new instance of RsnStructure. It is assumed that all links have geometric lenght = 0.3 km and catchment area = 0.1 km^2

Parameters:
generations - The number of generations of the RSN (number of recursive replacements)
myDis_I - A random variable with and associated probability distribution of the number of descendents of interior nodes
myDis_E - A random variable with and associated probability distribution of the number of descendents of exterioir nodes

RsnStructure

public RsnStructure(int generations,
                    ScaleDependentDiscreteDistribution myDis_I,
                    ScaleDependentDiscreteDistribution myDis_E)
Creates a new instance of RsnStructure. It is assumed that all links have geometric lenght = 0.3 km and catchment area = 0.1 km^2

Parameters:
generations - The number of generations of the RSN (number of recursive replacements)
myDis_I - A random variable with and associated probability distribution of the number of descendents of interior nodes
myDis_E - A random variable with and associated probability distribution of the number of descendents of exterioir nodes

RsnStructure

public RsnStructure(java.io.File theFile)
Creates a new instance of RsnStructure previously stored in a file

Parameters:
theFile - The file where the RSN structure is stored
Method Detail

getNetworkOrder

public int getNetworkOrder()
Returns the Strahler order of the RSN

Returns:
The Strahler order of the network

getConnectionStructure

public int[][] getConnectionStructure()
Returns the array describing the topologic connection structure of the links in the network

Returns:
An int[numLinks][numTributaries]

getNextLinkArray

public int[] getNextLinkArray()
Returns an array with the index of the downstream link

Returns:
An int[numLinks]

getMagnitudes

public int[] getMagnitudes()
Returns an array with the links Shreve's magnitude

Returns:
An int[numLinks]

getLinkAreas

public float[][] getLinkAreas()
Returns an array with the links catchment area

Returns:
An float[1][numLinks]

getUpAreas

public float[][] getUpAreas()
Returns an array with the links upstream area

Returns:
An float[1][numLinks]

getLinkLengths

public float[][] getLinkLengths()
Returns an array with the links geometric length

Returns:
An float[1][numLinks]

getUpLength

public float[][] getUpLength()
Returns an array with the links upstream total length

Returns:
An float[1][numLinks]

getHortonOrders

public float[][] getHortonOrders()
Returns an array with the links Strahler order

Returns:
An float[1][numLinks]

getLongestLength

public float[][] getLongestLength()
Returns an array with the links upstream longest channel lenght

Returns:
An float[1][numLinks]

getCompleteStreamLinksArray

public int[] getCompleteStreamLinksArray()
Returns an array with the index of the links that correspond to the bottom of complete order streams

Returns:
An int[numCompleteStreams]

writeRsnTreeDecoding

public void writeRsnTreeDecoding(java.io.File theFile)
                          throws java.io.IOException
Writes the RSN topologic and geometric structure to a file for later retreival and reconstruction

Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
Tests for the class

Parameters:
args - the command line arguments


CUENCAS was initially developed by Ricardo Mantilla at the University of Colorado under the supervision of Dr. Vijay K. Gupta. We wish to recognize the support from the National Science Fundation.