public class DistributedConjugateGradientSolver extends ConjugateGradientSolver implements org.apache.hadoop.util.Tool
Modifier and Type | Class and Description |
---|---|
class |
DistributedConjugateGradientSolver.DistributedConjugateGradientSolverJob |
DEFAULT_MAX_ERROR
Constructor and Description |
---|
DistributedConjugateGradientSolver() |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.conf.Configuration |
getConf() |
DistributedConjugateGradientSolver.DistributedConjugateGradientSolverJob |
job() |
static void |
main(String[] args) |
int |
run(String[] strings) |
Vector |
runJob(org.apache.hadoop.fs.Path inputPath,
org.apache.hadoop.fs.Path tempPath,
int numRows,
int numCols,
Vector b,
Preconditioner preconditioner,
int maxIterations,
double maxError)
Runs the distributed conjugate gradient solver programmatically to solve the system (A + lambda*I)x = b.
|
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
getIterations, getResidualNorm, solve, solve, solve
public Vector runJob(org.apache.hadoop.fs.Path inputPath, org.apache.hadoop.fs.Path tempPath, int numRows, int numCols, Vector b, Preconditioner preconditioner, int maxIterations, double maxError)
inputPath
- Path to the matrix AtempPath
- Path to scratch output path, deleted after the solver completesnumRows
- Number of rows in AnumCols
- Number of columns in Ab
- Vector bpreconditioner
- Optional preconditioner for the systemmaxIterations
- Maximum number of iterations to run, defaults to numColsmaxError
- Maximum error tolerated in the result. If the norm of the residual falls below this,
then the algorithm stops and returns.public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
public int run(String[] strings) throws Exception
run
in interface org.apache.hadoop.util.Tool
Exception
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.