Bonjour à tous,

j'aimerais calculer la compléxité de ces trois algorithmes.

Algo1

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
 
Require: A set of features artifacts {artifact}
Require: The current search UI configuration Pcurrent = {F1,F2,...,Fk}
Ensure: The resulted XML file (RF.xml)
1: RF.xml={} 
2: for all (f ∈ Pcurrent) do 
3:RF.xml= saxon artifact (F) merge.xslt with RF.xml > RF.xml
4: end for
Algo 2

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 
 
Adapter algorithm Require: A set of updated context observables C
Require: The current product configuration Pcurrent = {F1,F2,...,Fk}
Require: The set of adaptation rules AR
Ensure: A target product configuration Ptarget 
1: Ptarget ← Pcurrent 
2: for all (O ∈ C) do 
3: if (AR(O) ∈ Pcurrent) then 
4: if (O.value() = false) then 
5: Ptarget.deselect(AR(O)) 
6: end if
7: else 
8: if (O.value() = true) then
9: Ptarget.select (AR(O))
10: endif
11: end if
12: end for

Algo3

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
 
Recomposition Algorithm Require: the new configuration
Require: the set of feature artifacts
Ensure: the composed UI Product (CUI.xml file) 
1:resultedfile={}
2: for I ∈ features of the new configuration file
3:  for J ∈  {list of implementation artifacts}
4: if (value (I)=Name (J)) then 
5: merge (resultedfile, content(J))
6: end if
7: end for
8:end for

Veuillez m'excuser si je les ai mis tous d'un seul coup