コード例 #1
0
ファイル: ckp.go プロジェクト: sguzwf/algorithm
// Add or update scaling matrix set to checkpoint variables.
func AddScaleVar(w *sets.FloatMatrixSet) {
	if !active {
		return
	}
	// add all matrices of scale set to variable table
	for _, key := range w.Keys() {
		mset := w.At(key)
		for k, m := range mset {
			name := fmt.Sprintf("%s.%d", key, k)
			variables[name] = &dataPoint{vvar: &mVariable{m}}
		}
	}
}