Class Utilities

java.lang.Object
  extended by Utilities

public class Utilities
extends java.lang.Object


Field Summary
static Location END
           
static int MAX_NUMBER_OF_ANTS_RESPONDER_KILL
           
static int NUMBER_OF_ANTS
           
static int NUMBER_OF_COLUMNS
           
static int NUMBER_OF_ROWS
           
static Location START
           
 
Constructor Summary
Utilities()
           
 
Method Summary
static void print(java.util.Vector networkToPrint)
          Prints a network (Can be used by the Responder to print its network, or by the Finder to print the network that it revealed)
static void printResults(java.lang.String finderName, boolean isd, boolean isdp, boolean isdpp, int numbderOfRounds, java.lang.String message)
          Prints sessions results to the end of the file 'responder.log'.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

START

public static final Location START

END

public static final Location END

NUMBER_OF_ROWS

public static final int NUMBER_OF_ROWS
See Also:
Constant Field Values

NUMBER_OF_COLUMNS

public static final int NUMBER_OF_COLUMNS
See Also:
Constant Field Values

NUMBER_OF_ANTS

public static final int NUMBER_OF_ANTS
See Also:
Constant Field Values

MAX_NUMBER_OF_ANTS_RESPONDER_KILL

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

Utilities

public Utilities()
Method Detail

print

public static void print(java.util.Vector networkToPrint)
Prints a network (Can be used by the Responder to print its network, or by the Finder to print the network that it revealed)

Parameters:
networkToPrint - A vector of the Locations in the network - doesn't need to have a particular order.

printResults

public static void printResults(java.lang.String finderName,
                                boolean isd,
                                boolean isdp,
                                boolean isdpp,
                                int numbderOfRounds,
                                java.lang.String message)
Prints sessions results to the end of the file 'responder.log'. If the file doesn't already exit it will be created.

Parameters:
finderName - The name of the finder.
isd - An indication of whether the finder detected a valid path of length d, in case that such a path exists, or if it didn't report any in case none exist.
isdp - An indication of whether the finder detected a valid path of length d+1, in case that such a path exists, or if it didn't report any in case none exist.
isdpp - An indication of whether the finder detected a valid path of length d+2, in case that such a path exists, or if it didn't report any in case none exist.
numbderOfRounds - The number of rounds the it took the Finder to complete its task.
message - Any message