and.Mapping
Class Utils

java.lang.Object
  extended by and.Mapping.Utils

public class Utils
extends java.lang.Object

Class providing some tools to the library

Author:
Séastien Miquée

Constructor Summary
Utils()
           
 
Method Summary
static GNode createGNode()
          Creation of the representation of the node in the Mapping point of view.
static Grid createGridG5k(java.util.ArrayList<GNode> _an)
          Creation of the representation of the grid, according to clusters into sites.
static Graph readGraph(java.lang.String _file)
          Read an application Graph from a file.
static Grid readGrid(java.lang.String _file)
          Read a Grid graph from a file.
static void writeGraph(Graph _gr, java.lang.String _file, java.lang.String _path)
          Write an application Graph in a file.
static void writeGrid(Grid _gl, java.lang.String _file, java.lang.String _path)
          Write the Grid object in an XML file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

createGNode

public static GNode createGNode()
Creation of the representation of the node in the Mapping point of view. It needs some information about the computing node, which will be exploited by mapping algorithms.

Returns:
A node from the Mapping library

createGridG5k

public static Grid createGridG5k(java.util.ArrayList<GNode> _an)
Creation of the representation of the grid, according to clusters into sites. This representation may only fit on Grid'5000 like architectures (with computing nodes name based on the following pattern |cluster_name|id_of_node_into_cluster|.|site_of_cluster|.|organisation|.*|).

Parameters:
_an - the list of computing nodes connected
Returns:
the grid's architecture

writeGrid

public static void writeGrid(Grid _gl,
                             java.lang.String _file,
                             java.lang.String _path)
Write the Grid object in an XML file.

Parameters:
_gl - Grid graph to be write
_file - File's name
_path - File's path

writeGraph

public static void writeGraph(Graph _gr,
                              java.lang.String _file,
                              java.lang.String _path)
Write an application Graph in a file.

Parameters:
_gr - Application Graph to be write
_file - File's name
_path - File's path

readGraph

public static Graph readGraph(java.lang.String _file)
Read an application Graph from a file.

Parameters:
_file - File's name
Returns:
The application Graph read

readGrid

public static Grid readGrid(java.lang.String _file)
Read a Grid graph from a file.

Parameters:
_file - File's name
Returns:
The Grid graph read