Skip to content

Instantly share code, notes, and snippets.

@samueleresca
Last active December 25, 2021 10:37
Show Gist options
  • Save samueleresca/2a4a962ca28de13e7d31ff3ea8434ce7 to your computer and use it in GitHub Desktop.
Save samueleresca/2a4a962ca28de13e7d31ff3ea8434ce7 to your computer and use it in GitHub Desktop.
// 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