Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rice.pastry.testing
Class LeafSetTest

    java.lang.Object
      rice.pastry.testing.LeafSetTest

    public class LeafSetTest

extends java.lang.Object

This class tests the correctness of the leafset in Pastry.

Version:
  $Id: LeafSetTest.java 3613 2007-02-15 14:45:14Z jstewart $
Author:
  Alan Mislove

Nested Class Summary
`static class` | `LeafSetTest.TestNodeHandle`

Field Summary
`protected NodeIdFactory` | `factory`
`protected RandomSource` | `random`

Constructor Summary
`LeafSetTest()`

Method Summary
`protected int` | `abs(int x)`
`protected void` | `assertTrue(java.lang.String intention, boolean test)` Throws an exception if the test condition is not met.
`protected LeafSet` | `generateLeafSet(int size, int nodes, boolean crossover)` Returns a leafset of size size out of a network with the specified number of nodes
`static void` | `main(java.lang.String[] args)`
`protected int` | `min(int x, int y)`
`void` | `start()`
`void` | `testCumulativeRange()`
`void` | `testNonCumulativeRange()`
`void` | `testObservers()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### factory

    protected NodeIdFactory factory

### random

    protected RandomSource random

Constructor Detail

### LeafSetTest

    public LeafSetTest()

Method Detail

### start

    public void start()

### testObservers

    public void testObservers()

### assertTrue

    protected final void assertTrue(java.lang.String intention,
                                    boolean test)

  Throws an exception if the test condition is not met.

### min

    protected int min(int x,
                      int y)

### abs

    protected int abs(int x)

### testCumulativeRange

    public void testCumulativeRange()

### testNonCumulativeRange

    public void testNonCumulativeRange()

### generateLeafSet

    protected LeafSet generateLeafSet(int size,
                                      int nodes,
                                      boolean crossover)

  Returns a leafset of size size out of a network with the specified number of nodes

  Parameters:
    `size` - The size of the leaf set
    `nodes` - The number of nodes in the network
    `crossover` - Whether the leafset must cross over the '0' boundary not

### main

    public static void main(java.lang.String[] args)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.