SciLib.SP.Comm
Class Control

java.lang.Object
  extended by SciLib.SP.Comm.Control

public final class Control
extends java.lang.Object

This class contains some methods to perform the communications Control techniques.


Constructor Summary
Control()
           
 
Method Summary
static integerVector BellmanFord(int[][] d, int s, int t)
          Compute the least-cost path by Bellman-Ford Algorithm
static integerVector BellmanFord(int[][] d, int s, int t, int numLinks)
          Compute the least-cost path by Bellman-Ford Algorithm
static bitStream binaryDivision(bitStream M, bitStream P)
          Perform binary division between two bit strings
static bitStream CRC_Transmitted(bitStream M, bitStream P)
          Generate the transmitted signal with the Cyclic Redundancy Check
static boolean CRC(bitStream T, bitStream P)
          Perform a CRC check
static integerVector Dijkstra(double[][] d, int s, int t)
          Compute the least-cost path by Dijkstra Algorithm
static integerVector Dijkstra(int[][] d, int s, int t)
          Compute the least-cost path by Dijkstra Algorithm
static integerVector Dijkstra(matrix d, int s, int t)
          Compute the least-cost path by Dijkstra Algorithm
static bitStream FCS(bitStream M, bitStream P)
          Generate the FCS of the Cyclic Redundancy Check
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Control

public Control()
Method Detail

binaryDivision

public static bitStream binaryDivision(bitStream M,
                                       bitStream P)
Perform binary division between two bit strings

Parameters:
M - a bitStream, numerator
P - a bitStream, denominator
Returns:
a bitStream, the remainder of binary division

FCS

public static bitStream FCS(bitStream M,
                            bitStream P)
Generate the FCS of the Cyclic Redundancy Check

Parameters:
M - a bitStream message
P - a bitStream generator
Returns:
R a bitStream FCS

CRC_Transmitted

public static bitStream CRC_Transmitted(bitStream M,
                                        bitStream P)
Generate the transmitted signal with the Cyclic Redundancy Check

Parameters:
M - a bitStream message
P - a bitStream generator
Returns:
The transmitted bitSring

CRC

public static boolean CRC(bitStream T,
                          bitStream P)
Perform a CRC check

Parameters:
T - the received data
P - a bitStream generator
Returns:
a boolean : true for ok, false for error

Dijkstra

public static integerVector Dijkstra(double[][] d,
                                     int s,
                                     int t)
Compute the least-cost path by Dijkstra Algorithm

Parameters:
d - the cost matrix
s - the source, an integer
t - the destination, an integer
Returns:
a vector that contains all nodes of the path from s to t, for example : 1 4 5 6

Dijkstra

public static integerVector Dijkstra(int[][] d,
                                     int s,
                                     int t)
Compute the least-cost path by Dijkstra Algorithm

Parameters:
d - the cost matrix
s - the source, an integer
t - the destination, an integer
Returns:
a vector that contains all nodes of the path from s to t, for example : 1 4 5 6

Dijkstra

public static integerVector Dijkstra(matrix d,
                                     int s,
                                     int t)
Compute the least-cost path by Dijkstra Algorithm

Parameters:
d - the cost matrix
s - the source, an integer
t - the destination, an integer
Returns:
a vector that contains all nodes of the path from s to t, for example : 1 4 5 6

BellmanFord

public static integerVector BellmanFord(int[][] d,
                                        int s,
                                        int t,
                                        int numLinks)
Compute the least-cost path by Bellman-Ford Algorithm

Parameters:
d - the cost matrix
s - the source, an integer
t - the destination, an integer
Returns:
a vector that contains all nodes of the path from s to t, for example : 0 3 4 5

BellmanFord

public static integerVector BellmanFord(int[][] d,
                                        int s,
                                        int t)
Compute the least-cost path by Bellman-Ford Algorithm

Parameters:
d - the cost matrix
s - the source, an integer
t - the destination, an integer
Returns:
a vector that contains all nodes of the path from s to t, for example : 0 3 4 5