gov.sandia.cognition.learning.algorithm.minimization.matrix

## Class MatrixVectorMultiplier

• java.lang.Object
• gov.sandia.cognition.learning.algorithm.minimization.matrix.MatrixVectorMultiplier
• All Implemented Interfaces:
Evaluator<Vector,Vector>
Direct Known Subclasses:
MatrixVectorMultiplierWithPreconditioner, MultipartiteValenceMatrix, OverconstrainedMatrixVectorMultiplier

```@PublicationReference(author="Jonathan Richard Shewchuk",
title="An Introduction to the Conjugate Gradient Method Without the Agonizing Pain",
type=WebPage,
year=1994,
public class MatrixVectorMultiplier
extends java.lang.Object
implements Evaluator<Vector,Vector>```
The necessary multiplication wrapper class to match the FunctionMinimizer interface. Takes a matrix. Multiplies the input vector by the matrix, returning the result.
Since:
4.0.0
Author:
Jeremy D. Wendt
• ### Field Summary

Fields
Modifier and Type Field and Description
`protected Matrix` `m`
The matrix to multiply with.
• ### Constructor Summary

Constructors
Constructor and Description
`MatrixVectorMultiplier(Matrix m)`
Clones the input matrix to prevent any later edits to the input from changing the results of iterative multiplications.
• ### Method Summary

All Methods
Modifier and Type Method and Description
`boolean` `equals(java.lang.Object o)`
`Vector` `evaluate(Vector input)`
Returns m times input.
`int` `hashCode()`
• ### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`
• ### Field Detail

• #### m

`protected Matrix m`
The matrix to multiply with. This is a deep-copy of the input to prevent any weirdness from altering the matrix after the constructor is called.
• ### Constructor Detail

• #### MatrixVectorMultiplier

`public MatrixVectorMultiplier(Matrix m)`
Clones the input matrix to prevent any later edits to the input from changing the results of iterative multiplications.
Parameters:
`m` - The matrix to multiply with
• ### Method Detail

• #### evaluate

`public Vector evaluate(Vector input)`
Returns m times input.
Specified by:
`evaluate` in interface `Evaluator<Vector,Vector>`
Parameters:
`input` - The vector to multiply by m.
Returns:
m times input.
• #### equals

`public boolean equals(java.lang.Object o)`
Overrides:
`equals` in class `java.lang.Object`
• #### hashCode

`public int hashCode()`
Overrides:
`hashCode` in class `java.lang.Object`