func (p *Param) Check() error {
	var err error
	if p.deltaab < 0 {
		return fmt.Errorf("\ncondition: a <= b violated  (a = %v, b = %v)", p.a, p.a+p.deltaab)
	}
	if p.a+p.deltaab >= 1 {
		return fmt.Errorf("\ncondition: b < 1 violated  (b = %v)", p.a+p.deltaab)
	}
	if p.beta > 0.5 || p.beta < 0 {
		return fmt.Errorf("\ncondition: 0 <= beta <= 0.5 violated  (beta = %v)", p.beta)
	}
	if p.k <= 0 {
		return fmt.Errorf("\ncondition: k > 0 violated  (k = %v)", p.k)
	}
	if p.m < 0 {
		return fmt.Errorf("\ncondition: m >= 0 violated  (m = %v)", p.m)
	}
	if p.l <= 0 {
		return fmt.Errorf("\ncondition: l > 0 violated  (l = %v)", p.l)
	}
	if p.n <= 1 {
		return fmt.Errorf("\ncondition: n > 1 violated  (n = %v)", p.n)
	}
	if p.p0 < 0 || p.p0 > 1 {
		return fmt.Errorf("\ncondition: 0 <= p0 <= 1 violated  (p0 = %v)", p.p0)
	}
	if p.q < 0 || p.q >= 1 {
		return fmt.Errorf("\ncondition: 0 <= q < 1 violated  (q = %v)", p.q)
	}
	if p.advStrategy != 1 && p.advStrategy != 2 && p.advStrategy != 3 && p.advStrategy != 4 && p.advStrategy != 5 {
		return fmt.Errorf("\ngiven strategy not implemented  (strategy = %v)"+
			"\nUse -help for a list of available strategies", p.advStrategy)
	}
	if p.maxTermRound < p.m+p.l {
		return fmt.Errorf("\ncondition: maxTermRound >= m + l violated  (maxTermRound = %v)", p.maxTermRound)
	}
	return err
}
Check checks that all the input parameters are ok
package main
import "fmt"
type Param struct {
	a                         float64  
	deltaab                   float64  
	beta                      float64  
	enableExtremeBeta         bool     
	q                         float64  
	n                         int      
	n_honest                  int      
	n_adv                     int      
	Nrun                      int      
	k                         int      
	enableQueryk0             bool     
	k0                        int      
	l                         int      
	m                         int      
	p0                        float64  
	maxTermRound              int      
	enableRandN_adv           bool     
	EnableQueryWithRepetition bool     
	advStrategy               int      
	enableSaveEta             bool     
	etaAgreement              float64  
	rateRandomness            float64  
	enableWS                  bool     
	deltaWS                   float64  
	gammaWS                   float64  
	enableZipf                bool     
	sZipf                     float64  
}
func (p *Param) init() error {
	if err := p.Check(); err != nil {
		return err
	}
	p.n_honest = int(float64(p.n) * (1 - p.q))
	p.n_adv = p.n - p.n_honest
	return nil
}
func (p *Param) String() string {
	output := "Parameters: "
	output += fmt.Sprintf("a: %v - ", p.a)
	output += fmt.Sprintf("b: %v - ", p.a+p.deltaab)
	output += fmt.Sprintf("beta: %v - ", p.beta)
	output += fmt.Sprintf("k: %v - ", p.k)
	output += fmt.Sprintf("m: %v - ", p.m)
	output += fmt.Sprintf("l: %v - ", p.l)
	output += fmt.Sprintf("N:%v - ", p.n)
	output += fmt.Sprintf("p_0: %v - ", p.p0)
	output += fmt.Sprintf("q: %v - ", p.q)
	output += fmt.Sprintln("Adv_strategy:", p.advStrategy)
	return output
}