Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-ganeti
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
itminedu
snf-ganeti
Commits
24e1140f
Commit
24e1140f
authored
15 years ago
by
Iustin Pop
Browse files
Options
Downloads
Patches
Plain Diff
Remove a function in hail
This is not yet used.
parent
4333a887
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hail.hs
+0
-44
0 additions, 44 deletions
hail.hs
with
0 additions
and
44 deletions
hail.hs
+
0
−
44
View file @
24e1140f
...
...
@@ -112,50 +112,6 @@ options =
"show help"
]
{- | Start computing the solution at the given depth and recurse until
we find a valid solution or we exceed the maximum depth.
-}
iterateDepth
::
Cluster
.
Table
-- ^ The starting table
->
Int
-- ^ Remaining length
->
Cluster
.
NameList
-- ^ Node idx to name list
->
Cluster
.
NameList
-- ^ Inst idx to name list
->
Int
-- ^ Max node name len
->
Int
-- ^ Max instance name len
->
[[
String
]]
-- ^ Current command list
->
Bool
-- ^ Wheter to be silent
->
Cluster
.
Score
-- ^ Score at which to stop
->
IO
(
Cluster
.
Table
,
[[
String
]])
-- ^ The resulting table and
-- commands
iterateDepth
ini_tbl
max_rounds
ktn
kti
nmlen
imlen
cmd_strs
oneline
min_score
=
let
Cluster
.
Table
ini_nl
ini_il
ini_cv
ini_plc
=
ini_tbl
all_inst
=
Container
.
elems
ini_il
node_idx
=
map
Node
.
idx
.
filter
(
not
.
Node
.
offline
)
$
Container
.
elems
ini_nl
fin_tbl
=
Cluster
.
checkMove
node_idx
ini_tbl
all_inst
(
Cluster
.
Table
_
_
fin_cv
fin_plc
)
=
fin_tbl
ini_plc_len
=
length
ini_plc
fin_plc_len
=
length
fin_plc
allowed_next
=
(
max_rounds
<
0
||
length
fin_plc
<
max_rounds
)
in
do
let
(
sol_line
,
cmds
)
=
Cluster
.
printSolutionLine
ini_il
ktn
nmlen
imlen
(
head
fin_plc
)
fin_plc_len
upd_cmd_strs
=
cmds
:
cmd_strs
unless
(
oneline
||
fin_plc_len
==
ini_plc_len
)
$
do
putStrLn
sol_line
hFlush
stdout
(
if
fin_cv
<
ini_cv
then
-- this round made success, try deeper
if
allowed_next
&&
fin_cv
>
min_score
then
iterateDepth
fin_tbl
max_rounds
ktn
kti
nmlen
imlen
upd_cmd_strs
oneline
min_score
-- don't go deeper, but return the better solution
else
return
(
fin_tbl
,
upd_cmd_strs
)
else
return
(
ini_tbl
,
cmd_strs
))
-- | Formats the solution for the oneline display
formatOneline
::
Double
->
Int
->
Double
->
String
formatOneline
ini_cv
plc_len
fin_cv
=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment