Exemple #1
0
func (g *epigraphH) Hf(u, v MatrixVariable, alpha, beta float64) (err error) {
	err = nil
	u_e, u_ok := u.(*epigraph)
	v_e, v_ok := v.(*epigraph)
	if !u_ok {
		err = errors.New("'u' not a epigraph")
		return
	}
	if !v_ok {
		err = errors.New("'v' not a epigraph")
		return
	}
	err = blas.SymvFloat(g.h, u_e.m(), v_e.m(), alpha, beta)
	v_e.set(v_e.t() + beta*v_e.t())

	return
}
Exemple #2
0
func (hf *matrixVarH) Hf(u, v MatrixVariable, alpha, beta float64) error {
	return blas.SymvFloat(hf.h, u.Matrix(), v.Matrix(), alpha, beta)
}
Exemple #3
0
func (p *matrixVarP) Pf(u, v MatrixVariable, alpha, beta float64) (err error) {
	err = blas.SymvFloat(p.mP, u.Matrix(), v.Matrix(), alpha, beta)
	return
}