Пример #1
0
func checkOneLt(lt ltry.Ltry, ltsBase ltry.LSet) (pv int) {
	for idx2 := 0; idx2 < ltsBase.Len(); idx2++ {
		ltbase, err2 := ltsBase.GetLt(idx2)
		if !err2 {
			continue
		}
		pv += lt.CheckM(ltbase)
	}
	return
}
Пример #2
0
func checkSets(lts ltry.LSet, ltsbase ltry.LSet) (pValue []int) {
	pValue = make([]int, lts.Len())

	for idx := 0; idx < lts.Len(); idx++ {
		pv := 0
		lt, err := lts.GetLt(idx)
		if !err {
			continue
		}
		for idx2 := 0; idx2 < ltsbase.Len(); idx2++ {
			ltbase, err2 := ltsbase.GetLt(idx2)
			if !err2 {
				continue
			}
			pv += lt.CheckM(ltbase)
		}
		pValue[idx] = pv
	}

	return
}