Last active
December 25, 2021 10:37
-
-
Save samueleresca/2a4a962ca28de13e7d31ff3ea8434ce7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Strategy defines a strategy related to a QuorumSystem. | |
type Strategy struct { | |
Qs QuorumSystem | |
SigmaR Sigma | |
SigmaW Sigma | |
nodeToReadProbability map[Node]Probability | |
nodeToWriteProbability map[Node]Probability | |
} | |
// Sigma defines the probabilities of a specific Strategy. Each Expr (quorum) has a probability of being choose associated. | |
type Sigma struct { | |
Values []SigmaRecord | |
} | |
// SigmaRecord defines as ExprSet that represents a quorum and the probability of being chosen. | |
type SigmaRecord struct { | |
Quorum ExprSet | |
Probability Probability | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment