A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
mapping.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adding new functionalities.
[mapping.git]
/
src
/
and
/
Mapping
/
Graph.java
diff --git
a/src/and/Mapping/Graph.java
b/src/and/Mapping/Graph.java
index
8f255cd
..
e9ac2a2
100644
(file)
--- a/
src/and/Mapping/Graph.java
+++ b/
src/and/Mapping/Graph.java
@@
-18,6
+18,7
@@
public class Graph implements Serializable
private ArrayList<GTask> graph ;
private int nb_dep_total ;
private ArrayList<GTask> graph ;
private int nb_dep_total ;
+ private int maxDep ;
/**
/**
@@
-27,6
+28,7
@@
public class Graph implements Serializable
{
graph = new ArrayList<GTask>() ;
nb_dep_total = 0 ;
{
graph = new ArrayList<GTask>() ;
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() ;
{
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() ;
{
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 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 ;
+ }
/**
/**