mwalk Platform 0.3.0

mwalk.util
Class DegreeCount

java.lang.Object
  |
  +--mwalk.util.DegreeCount

public class DegreeCount
extends java.lang.Object

A class used by the degree count visitor to track the degree data.

Version:
1.0
Author:
Robert Chalmers00

Field Summary
 java.lang.Object data
          Optional data to be passed back with count
 boolean fromReceiver
          Whether this count comes from a receiver
 int interior
          Number of active links to routers
 int leaf
          Number of active links to receivers
 int links
          Number of active links
 int receivers
          Number of receivers downstream
 
Constructor Summary
DegreeCount()
          Default constructor.
DegreeCount(boolean active)
          Constructor.
DegreeCount(boolean active, java.lang.Object data)
          Constructor.
DegreeCount(int receivers, int links, int leaves, java.lang.Object data)
          Constructor.
DegreeCount(java.lang.Object data)
          Constructor.
 
Method Summary
 void add(DegreeCount count)
          Add a degree count to a running total.
 void addReceivers(DegreeCount count)
          Add just the number of downstream receivers to a running total.
 java.lang.String toString()
          Print a count as a tab-separated string.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

fromReceiver

public boolean fromReceiver
Whether this count comes from a receiver

receivers

public int receivers
Number of receivers downstream

links

public int links
Number of active links

leaf

public int leaf
Number of active links to receivers

interior

public int interior
Number of active links to routers

data

public java.lang.Object data
Optional data to be passed back with count
Constructor Detail

DegreeCount

public DegreeCount()
Default constructor.

DegreeCount

public DegreeCount(java.lang.Object data)
Constructor.
Parameters:
Object - optional data to pass along with count

DegreeCount

public DegreeCount(boolean active)
Constructor.
Parameters:
boolean - whether receiver is active

DegreeCount

public DegreeCount(boolean active,
                   java.lang.Object data)
Constructor.
Parameters:
boolean - whether receiver is active
Object - optional data to pass along with count

DegreeCount

public DegreeCount(int receivers,
                   int links,
                   int leaves,
                   java.lang.Object data)
Constructor.
Parameters:
int - number of downstream receivers
int - total number of links
int - number of links connected to receivers
Object - optional data to pass along with count
Method Detail

add

public void add(DegreeCount count)
Add a degree count to a running total. This simply increments the link counts if some receivers are downstream.
Parameters:
DegreeCount - count from downstream neighbor

addReceivers

public void addReceivers(DegreeCount count)
Add just the number of downstream receivers to a running total.
Parameters:
DegreeCount - count from downstream neighbor

toString

public java.lang.String toString()
Print a count as a tab-separated string.
Overrides:
toString in class java.lang.Object

mwalk Platform 0.3.0

Submit a bug or feature mwalk Platform API Specification 0.3.0
Sensitivity: {Public:Research}
Copyright(c) 2000, Robert Chalmers