X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/mapping.git/blobdiff_plain/d5231d68ea145eedd724eb55d1fa56a1c5a7c660..04237b062ba76603c6be49d9ba84121691aa4009:/src/and/Mapping/Graph.java diff --git a/src/and/Mapping/Graph.java b/src/and/Mapping/Graph.java index 8f255cd..e9ac2a2 100644 --- a/src/and/Mapping/Graph.java +++ b/src/and/Mapping/Graph.java @@ -18,6 +18,7 @@ public class Graph implements Serializable private ArrayList graph ; private int nb_dep_total ; + private int maxDep ; /** @@ -27,6 +28,7 @@ public class Graph implements Serializable { graph = new ArrayList() ; nb_dep_total = 0 ; + maxDep = 0 ; } @@ -50,7 +52,11 @@ public class Graph implements Serializable { graph.add( _t.getNum(), _t ) ; nb_dep_total += _t.getNbDep() ; -// nb_task ++ ; + + if ( _t.getNbDep() > maxDep ) + { + maxDep = _t.getNbDep() ; + } } } @@ -67,6 +73,11 @@ public class Graph implements Serializable { graph.add( _lt.get( i ).getNum(), _lt.get( i ) ) ; nb_dep_total += _lt.get( i ).getNbDep() ; + + if ( _lt.get( i ).getNbDep() > maxDep ) + { + maxDep = _lt.get( i ).getNbDep() ; + } } } } @@ -90,6 +101,16 @@ public class Graph implements Serializable { return nb_dep_total / graph.size() ; } + + + /** + * Return the max amount of dependencies a task of the graphs can have. + * @return The maximum amount of dependencies + */ + public int getMaxDep() + { + return maxDep ; + } /**