func (ps *Sets) ElemLabel(idx int) string {
	return (*ps)[idx].Name
}
ElemLabel satisfies the gi.SliceLabeler interface to provide labels for slice elements
package params
import (
	"fmt"
	"log"
	"github.com/goki/ki/kit"
)
type Params map[string]string
func (pr *Params) ParamByNameTry(name string) (string, error) {
	vl, ok := (*pr)[name]
	if !ok {
		err := fmt.Errorf("params.Params: parameter named %v not found", name)
		log.Println(err)
		return "", err
	}
	return vl, nil
}
func (pr *Params) ParamByName(name string) string {
	return (*pr)[name]
}
func (pr *Params) SetParamByName(name, value string) {
	(*pr)[name] = value
}
var KiT_Params = kit.Types.AddType(&Params{}, ParamsProps)
type Sel struct {
	Sel    string `width:"30" desc:"selector for what to apply the parameters to, using standard css selector syntax: .Example applies to anything with a Class tag of 'Example', #Example applies to anything with a Name of 'Example', and Example with no prefix applies to anything of type 'Example'"`
	Desc   string `width:"60" desc:"description of these parameter values -- what effect do they have?  what range was explored?  it is valuable to record this information as you explore the params."`
	Params Params `view:"no-inline" desc:"parameter values to apply to whatever matches the selector"`
}
var KiT_Sel = kit.Types.AddType(&Sel{}, SelProps)
type Sheet []*Sel
func (sh *Sheet) ElemLabel(idx int) string {
	return (*sh)[idx].Sel
}
var KiT_Sheet = kit.Types.AddType(&Sheet{}, SheetProps)
func (sh *Sheet) SelByNameTry(sel string) (*Sel, error) {
	sl := sh.SelByName(sel)
	if sl == nil {
		err := fmt.Errorf("params.Sheet: Sel named %v not found", sel)
		log.Println(err)
		return nil, err
	}
	return sl, nil
}
func (sh *Sheet) SelByName(sel string) *Sel {
	for _, sl := range *sh {
		if sl.Sel == sel {
			return sl
		}
	}
	return nil
}
type Sheets map[string]*Sheet
var KiT_Sheets = kit.Types.AddType(&Sheets{}, SheetsProps)
type Set struct {
	Name   string `desc:"unique name of this set of parameters"`
	Desc   string `width:"60" desc:"description of this param set -- when should it be used?  how is it different from the other sets?"`
	Sheets Sheets `desc:"Sheet's grouped according to their target and / or function, e.g., "Network" for all the network params (or "Learn" vs. "Act" for more fine-grained), and "Sim" for overall simulation control parameters, "Env" for environment parameters, etc.  It is completely up to your program to lookup these names and apply them as appropriate"`
}
var KiT_Set = kit.Types.AddType(&Set{}, SetProps)
func (ps *Set) SheetByNameTry(name string) (*Sheet, error) {
	psht, ok := ps.Sheets[name]
	if !ok {
		err := fmt.Errorf("params.Set: %v Sheet named %v not found", ps.Name, name)
		log.Println(err)
		return nil, err
	}
	return psht, nil
}
func (ps *Set) SheetByName(name string) *Sheet {
	return ps.Sheets[name]
}
func (ps *Set) ValidateSheets(valids []string) error {
	var invalids []string
	for nm := range ps.Sheets {
		got := false
		for _, vl := range valids {
			if nm == vl {
				got = true
				break
			}
		}
		if !got {
			invalids = append(invalids, nm)
		}
	}
	if len(invalids) > 0 {
		err := fmt.Errorf("params.Set: %v Invalid sheet names: %v", ps.Name, invalids)
		log.Println(err)
		return err
	}
	return nil
}
type Sets []*Set
var KiT_Sets = kit.Types.AddType(&Sets{}, SetsProps)
func (ps *Sets) SetByNameTry(name string) (*Set, error) {
	for _, st := range *ps {
		if st.Name == name {
			return st, nil
		}
	}
	err := fmt.Errorf("params.Sets: Param Set named %v not found", name)
	log.Println(err)
	return nil, err
}
func (ps *Sets) SetByName(name string) *Set {
	st, _ := ps.SetByNameTry(name)
	return st
}
func (ps *Sets) ValidateSheets(valids []string) error {
	var err error
	for _, st := range *ps {
		er := st.ValidateSheets(valids)
		if er != nil {
			err = er
		}
	}
	return err
}