Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IA04 TP3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Mohamed Fall
IA04 TP3
Commits
2f3765f7
Commit
2f3765f7
authored
2 years ago
by
Antoine Kryus
Browse files
Options
Downloads
Patches
Plain Diff
add tiebreak factory, SCF Factory functions
parent
038e073b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
comsoc/comsoc.go
+0
-0
0 additions, 0 deletions
comsoc/comsoc.go
comsoc/majority.go
+1
-1
1 addition, 1 deletion
comsoc/majority.go
comsoc/utils.go
+1
-2
1 addition, 2 deletions
comsoc/utils.go
with
2 additions
and
3 deletions
comsoc/comsoc.go
deleted
100644 → 0
+
0
−
0
View file @
038e073b
This diff is collapsed.
Click to expand it.
comsoc/majority.go
+
1
−
1
View file @
2f3765f7
...
...
@@ -3,7 +3,7 @@ package comsoc
import
()
func
MajoritySWF
(
p
Profile
)
(
count
Count
,
err
error
)
{
for
i
,
voter
:=
range
p
{
for
_
,
voter
:=
range
p
{
count
[
voter
[
0
]]
+=
1
}
// 0-votes alternatives are not included
return
count
,
nil
...
...
This diff is collapsed.
Click to expand it.
comsoc/utils.go
+
1
−
2
View file @
2f3765f7
...
...
@@ -38,7 +38,7 @@ func maxCount(count Count) (bestAlts []Alternative) {
}
// vérifie le profil donné, par ex. qu'ils sont tous complets et que chaque alternative n'apparaît qu'une seule fois par préférences
func
checkProfile
(
prefs
Profile
)
error
//
func checkProfile(prefs Profile) error
// vérifier que tout le monde a les mêmes alternatives, qu'il n'est pas vide
...
...
@@ -59,5 +59,4 @@ func checkProfileAlternative(prefs Profile, alts []Alternative) error {
}
return
nil
}
//jerome.gaigne@hds.utc.fr
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