File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed
Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 22
33< head >
44 < title > Easy Online MCDM</ title >
5+ < script src ="./target/scala-3.6.4/mcdm-opt.js " defer > </ script >
56 < link rel ="stylesheet " href ="style.css ">
67</ head >
78
@@ -196,7 +197,10 @@ <h3>Enter your data and go on!</h3>
196197 < label for ="check_wpm "> Wpm</ label >
197198 < input type ="checkbox " id ="check_wpm "> </ input >
198199 </ td >
199- < td > </ td >
200+ < td >
201+ < label for ="check_nds "> Nds</ label >
202+ < input type ="checkbox " id ="check_nds "> </ input >
203+ </ td >
200204 </ tr >
201205 </ table >
202206
@@ -233,7 +237,7 @@ <h3>Enter your data and go on!</h3>
233237 < fieldset >
234238 < legend > Ranks</ legend >
235239 < div id ="div_output_ranks ">
236-
240+ < script src =" ./target/scala-3.6.4/mcdm-opt.js " > </ script >
237241 </ div >
238242 </ fieldset >
239243 </ fieldset >
@@ -244,6 +248,6 @@ <h3>Enter your data and go on!</h3>
244248</ body >
245249
246250
247- < script src =" ./target/scala-3.6.4/mcdm-fastopt.js " > </ script >
251+
248252
249253</ html >
Original file line number Diff line number Diff line change @@ -351,6 +351,14 @@ def evaluate(problem: MCDMProblem): Unit =
351351 methodsnames = methodsnames.appended(" Wpm" )
352352 scores = Matrix .appendcol(scores, wpmresult.scores)
353353 ranks = Matrix .appendcol(ranks, wpmresult.ranks)
354+ if check_nds.checked then
355+ val ndsresult = nds(
356+ problem.data,
357+ Parser .str2directions(problem.directions)
358+ )
359+ methodsnames = methodsnames.appended(" Nds" )
360+ scores = Matrix .appendcol(scores, ndsresult.scores)
361+ ranks = Matrix .appendcol(ranks, ndsresult.scores.reverse.map(_ + 1 ))
354362
355363 val resultstr = HtmlUtils .scorematrixtohtml(problem, methodsnames, scores)
356364 div_output_scores.innerHTML = resultstr
Original file line number Diff line number Diff line change @@ -128,3 +128,6 @@ object DomObjects:
128128 val check_wpm = document
129129 .getElementById(" check_wpm" )
130130 .asInstanceOf [HTMLInputElement ]
131+ val check_nds = document
132+ .getElementById(" check_nds" )
133+ .asInstanceOf [HTMLInputElement ]
You can’t perform that action at this time.
0 commit comments