Class ASN

java.lang.Object
  |
  +--ASN
All Implemented Interfaces:
java.lang.Comparable

public class ASN
extends java.lang.Object
implements java.lang.Comparable

ASN constructors.


Field Summary
static int INFINITE_ASN
           
static int INFINITELY_FAR
           
static int MAX_ASN
           
 
Constructor Summary
ASN(int asNum)
          Creates new Autonomous System Number Object
ASN(int asNum, java.lang.String name, int longitude)
           
ASN(int asNum, java.lang.String name, int latitude, int longitude)
           
 
Method Summary
 void addByteHops(long bh)
           
 boolean addNeighbor(ASN newNeighbor)
           
 void addRange(IPRange ipRange)
           
 void adopt(ASN aDaughter)
           
 ASN ancestor()
           
 java.lang.String ancestry()
           
 java.lang.String ancestry(java.lang.String delimiter)
           
 ASN bestUphillNeighbor()
           
 int compareTo(java.lang.Object otherASN)
           
 int computeDownstreamSize()
           
 long computeGlobalDemand()
           
 int connectionsToBB()
          returns the number of backbone nodes
 int coveringNeighbor(ASN otherASN, int tolerance)
          returns distance to the neighbor whose neighbor set least covers (overhangs) this object.
 int daughterCount()
           
 int deepestChild()
           
 boolean dominates(ASN otherASN)
           
 boolean equals(java.lang.Object otherASN)
           
 int getASN()
           
 long getByteHops()
           
 java.util.ArrayList getDaughters()
           
 long getDemand()
           
 int getDescendentCount()
           
 int getHopsToBackbone()
           
 long getIPCount()
           
 int getLatitude()
           
 int getLongitude()
           
 java.lang.String getName()
           
 java.lang.String getNeighborString()
           
 int getOutDegree()
           
 ASN getParent()
           
 java.util.ArrayList getRanges()
           
 int hammingDistance(ASN otherASN)
           
 boolean hasCache()
           
 boolean isOrphan()
           
 ASN leastCoveringNeighbor(double toleranceD)
           
 int neighborCount()
           
 int overhang(ASN otherASN)
          overhang(ASN otherASN) computes the number of neighbors he has that are NOT in my list of neighbors
 void putByteHops(long dh)
           
 void putCache(boolean cached)
           
 void putDemand(long demand)
           
 void resetHopsToBackbone()
          forces hopsToBackbone to be infinity.
 void setChildBBHops()
           
 void setHopsToBackbone(int hops)
          sets the number of hops to the backbone if it is not already a better value.
 void setLongitude(int longitude)
           
 void setName(java.lang.String name)
           
 void setNeighborBBHops()
           
 void setOutDegree(int i)
           
 void setParent(ASN mom)
           
 int sharedNeighbors(ASN otherASN)
          counts the number of nodes that are neighbors of both me and otherASN.
 void showDescendents(java.lang.String prefix)
           
 void sortNeighbors()
           
 java.lang.String toString()
           
 int treeDepth(int depthSoFar)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INFINITELY_FAR

public static final int INFINITELY_FAR
See Also:
Constant Field Values

INFINITE_ASN

public static final int INFINITE_ASN
See Also:
Constant Field Values

MAX_ASN

public static final int MAX_ASN
See Also:
Constant Field Values
Constructor Detail

ASN

public ASN(int asNum)
Creates new Autonomous System Number Object


ASN

public ASN(int asNum,
           java.lang.String name,
           int longitude)

ASN

public ASN(int asNum,
           java.lang.String name,
           int latitude,
           int longitude)
Method Detail

addRange

public void addRange(IPRange ipRange)

addNeighbor

public boolean addNeighbor(ASN newNeighbor)

hammingDistance

public int hammingDistance(ASN otherASN)

coveringNeighbor

public int coveringNeighbor(ASN otherASN,
                            int tolerance)
returns distance to the neighbor whose neighbor set least covers (overhangs) this object.


sharedNeighbors

public int sharedNeighbors(ASN otherASN)
counts the number of nodes that are neighbors of both me and otherASN. Note: since we both include our own AS, the minimum number of shared neighbors with a neighbor is 2.


overhang

public int overhang(ASN otherASN)
overhang(ASN otherASN) computes the number of neighbors he has that are NOT in my list of neighbors


dominates

public boolean dominates(ASN otherASN)

neighborCount

public int neighborCount()

daughterCount

public int daughterCount()

bestUphillNeighbor

public ASN bestUphillNeighbor()

leastCoveringNeighbor

public ASN leastCoveringNeighbor(double toleranceD)

setOutDegree

public void setOutDegree(int i)

getOutDegree

public int getOutDegree()

sortNeighbors

public void sortNeighbors()

adopt

public void adopt(ASN aDaughter)

getParent

public ASN getParent()

setParent

public void setParent(ASN mom)

setName

public void setName(java.lang.String name)

getName

public java.lang.String getName()

setLongitude

public void setLongitude(int longitude)

getLongitude

public int getLongitude()

getLatitude

public int getLatitude()

isOrphan

public boolean isOrphan()

showDescendents

public void showDescendents(java.lang.String prefix)

getDescendentCount

public int getDescendentCount()

ancestry

public java.lang.String ancestry()

ancestry

public java.lang.String ancestry(java.lang.String delimiter)

ancestor

public ASN ancestor()

getIPCount

public long getIPCount()

getRanges

public java.util.ArrayList getRanges()

getDaughters

public java.util.ArrayList getDaughters()

getNeighborString

public java.lang.String getNeighborString()

getASN

public int getASN()

getHopsToBackbone

public int getHopsToBackbone()

setHopsToBackbone

public void setHopsToBackbone(int hops)
sets the number of hops to the backbone if it is not already a better value.


resetHopsToBackbone

public void resetHopsToBackbone()
forces hopsToBackbone to be infinity. This routine is used to restart the process of counting distances.


connectionsToBB

public int connectionsToBB()
returns the number of backbone nodes


setNeighborBBHops

public void setNeighborBBHops()

setChildBBHops

public void setChildBBHops()

putDemand

public void putDemand(long demand)

getDemand

public long getDemand()

computeDownstreamSize

public int computeDownstreamSize()

computeGlobalDemand

public long computeGlobalDemand()

addByteHops

public void addByteHops(long bh)

putByteHops

public void putByteHops(long dh)

getByteHops

public long getByteHops()

treeDepth

public int treeDepth(int depthSoFar)

deepestChild

public int deepestChild()

putCache

public void putCache(boolean cached)

hasCache

public boolean hasCache()

compareTo

public int compareTo(java.lang.Object otherASN)
Specified by:
compareTo in interface java.lang.Comparable

equals

public boolean equals(java.lang.Object otherASN)
Overrides:
equals in class java.lang.Object

toString

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