Esempio n. 1
0
func SinglePath(w http.ResponseWriter, r *http.Request) error {
	rc := retcalc.NewRetCalc()
	return json.NewEncoder(w).Encode(rc.PercentilePath(0.25))
}
Esempio n. 2
0
func Retcalc_basic(w http.ResponseWriter, r *http.Request) error {
	rc := retcalc.NewRetCalc()
	return json.NewEncoder(w).Encode(rc)
}
Esempio n. 3
0
/*
func Retcalc_user_input(w http.ResponseWriter, r *http.Request) error {
	req := retcalc.RetCalcWebInput{}
	if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
		panic(err)
	}
	return json.NewEncoder(w).Encode(req)
}
*/
func IncomesJSON(w http.ResponseWriter, r *http.Request) error {
	rc := retcalc.NewRetCalc()
	return json.NewEncoder(w).Encode(retcalc.HistoFromSlice(rc.RunIncomes()))
}
func TestHistoCumulative(t *testing.T) {
	rc := retcalc.NewRetCalc()
	a := rc.RunIncomes()
}