We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
Now, design in linsolve/iterative.go is:
func Iterative(a MulVecToer, b *mat.VecDense, ...
Matrix a have matrix interface:
a
type MulVecToer interface { // MulVecTo computes A*x or Aᵀ*x and stores the result into dst. MulVecTo(dst *mat.VecDense, trans bool, x mat.Vector) }
For my sparse matrix in my rep cannot implement that interface MulVecToer.
MulVecToer
Could you replace type of variable a into type func(trans bool, x mat.Vector). So, example linsolve/iterative_example_test.go look like:
func(trans bool, x mat.Vector)
linsolve/iterative_example_test.go
... ATx := func(trans bool, x mat.Vector){ a.MulVecTo(mat.NewVecDense(dim, nil), trans, x) } result, err := linsolve.Iterative(ATx, sys.B, &linsolve.CG{}, nil) if err != nil { fmt.Println("Error:", err) return } ...
So, design in linsolve/iterative.go in my point of view:
func Iterative(a func(trans bool, x mat.Vector), b *mat.VecDense, ...
Feel free for ignore.
The text was updated successfully, but these errors were encountered:
Excuse me, I find the solution without changes
Sorry, something went wrong.
No branches or pull requests
Hello,
Now, design in linsolve/iterative.go is:
Matrix
a
have matrix interface:For my sparse matrix in my rep cannot implement that interface
MulVecToer
.Could you replace type of variable
a
into typefunc(trans bool, x mat.Vector)
.So, example
linsolve/iterative_example_test.go
look like:So, design in linsolve/iterative.go in my point of view:
Feel free for ignore.
The text was updated successfully, but these errors were encountered: