uk.ac.leeds.ccg.andyt.vector.geometry
Class Vector_Network2D

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.vector.geometry.Vector_AbstractGeometry2D
      extended by uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Network2D
All Implemented Interfaces:
java.io.Serializable

public class Vector_Network2D
extends Vector_AbstractGeometry2D
implements java.io.Serializable

Class for networks. These comprise a HashMap of Vector_Point2D instances each linked to a HashSet of Connections. Each Connection comprises of a Vector_Point2D instance and a value.

See Also:
Serialized Form

Nested Class Summary
 class Vector_Network2D.Connection
           
 
Field Summary
 java.util.HashMap<Vector_Point2D,java.util.HashSet<Vector_Network2D.Connection>> _Connection_HashMap
           
static int DefaultType
           
static double DefaultValue
           
 
Fields inherited from class uk.ac.leeds.ccg.andyt.vector.geometry.Vector_AbstractGeometry2D
_DecimalPlacePrecision_Integer, _RoundingMode, _Vector_Environment
 
Constructor Summary
Vector_Network2D()
           
Vector_Network2D(uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell aGrid2DSquareCell)
           
 
Method Summary
 void addToNetwork(Vector_Network2D a_Network, int operator)
          Adds the points and connections from a_Network into this.
 void addToNetwork(Vector_Point2D toConnect_Point2D, java.util.HashSet<Vector_Network2D.Connection> a_Connections_HashSet)
           
 void addToNetwork(Vector_Point2D toConnect_Point2D, Vector_Network2D.Connection a_Connection, int operator)
           
 void addToNetwork(Vector_Point2D toConnect_Point2D, Vector_Point2D toConnectTo_Point2D)
          Adds a connection with a Default Type and Value using the operator.
 void addToNetwork(Vector_Point2D toConnect_Point2D, Vector_Point2D toConnectTo_Point2D, int operator)
          Adds a connection with a Default Type and Value using the operator.
 void applyDecimalPlacePrecision()
           
 Vector_Envelope2D getEnvelope2D()
           
 java.util.HashSet<Vector_Point2D> getNeighbouringPoints(uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell aGrid2DSquareCell, long row, long col)
           
 java.lang.String toString()
           
 
Methods inherited from class uk.ac.leeds.ccg.andyt.vector.geometry.Vector_AbstractGeometry2D
get_DecimalPlacePrecision, get_RoundingMode, getDefault_RoundingMode, getDefaultDecimalPlacePrecision_int, set_DecimalPlacePrecision
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DefaultValue

public static double DefaultValue

DefaultType

public static int DefaultType

_Connection_HashMap

public java.util.HashMap<Vector_Point2D,java.util.HashSet<Vector_Network2D.Connection>> _Connection_HashMap
Constructor Detail

Vector_Network2D

public Vector_Network2D()

Vector_Network2D

public Vector_Network2D(uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell aGrid2DSquareCell)
Method Detail

addToNetwork

public void addToNetwork(Vector_Network2D a_Network,
                         int operator)
Adds the points and connections from a_Network into this. If lowest is true then for connections between the same start and end points of the same type, the lowest value of these is maintained, otherwise the highest is. operator == 1, then min; operator == 2, then max; operator == 3, then increment; operator == 4, then sum;

Parameters:
a_Network -
operator: -

addToNetwork

public void addToNetwork(Vector_Point2D toConnect_Point2D,
                         java.util.HashSet<Vector_Network2D.Connection> a_Connections_HashSet)

addToNetwork

public void addToNetwork(Vector_Point2D toConnect_Point2D,
                         Vector_Network2D.Connection a_Connection,
                         int operator)
Parameters:
toConnect_Point2D -
a_Connection -
operator: - operator 0, min; operator 1, max; operator default, sum.

addToNetwork

public void addToNetwork(Vector_Point2D toConnect_Point2D,
                         Vector_Point2D toConnectTo_Point2D,
                         int operator)
Adds a connection with a Default Type and Value using the operator.

Parameters:
toConnect_Point2D -
toConnectTo_Point2D -
operator: - operator 0, min; operator 1, max; operator default, sum.

addToNetwork

public void addToNetwork(Vector_Point2D toConnect_Point2D,
                         Vector_Point2D toConnectTo_Point2D)
Adds a connection with a Default Type and Value using the operator.

Parameters:
toConnect_Point2D -
toConnectTo_Point2D -
operator: - operator 0, min; operator 1, max; operator default, sum.

toString

public java.lang.String toString()
Overrides:
toString in class Vector_AbstractGeometry2D

getNeighbouringPoints

public java.util.HashSet<Vector_Point2D> getNeighbouringPoints(uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell aGrid2DSquareCell,
                                                               long row,
                                                               long col)

getEnvelope2D

public Vector_Envelope2D getEnvelope2D()
Specified by:
getEnvelope2D in class Vector_AbstractGeometry2D

applyDecimalPlacePrecision

public void applyDecimalPlacePrecision()
Specified by:
applyDecimalPlacePrecision in class Vector_AbstractGeometry2D