Interface for fast tightly coupled summation across fixed x,wantGrad,wantHessian varying ExampleRow into an accumulating VEval. Designed usage: summing a score across a data set (i.e. plug into com.winvector.opt.impl.DataFn ) @author johnmount
| 10 | * |
| 11 | */ |
| 12 | public interface LinearContribution<T extends ExampleRow> extends Serializable { |
| 13 | int dim(); |
| 14 | int noutcomes(); |
| 15 | |
| 16 | /** |
| 17 | * |
| 18 | * @param x model coefficients (must have length dim()) |
| 19 | * @param wantGrad |
| 20 | * @param wantHessian |
| 21 | * @param d data row |
| 22 | * @param r where to sum results |
| 23 | * @param pscratch (dim noutcomes) scratch space |
| 24 | */ |
| 25 | void addTerm(double[] x, boolean wantGrad, boolean wantHessian, T d, VEval r, double[] pscratch); |
| 26 | } |
no outgoing calls
no test coverage detected