javax.constraints.linear.LinearSolverFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsr331-linear Show documentation
Show all versions of jsr331-linear Show documentation
This is a common JSR331 interface for different linear solvers
The newest version!
package javax.constraints.linear;
import javax.constraints.impl.Problem;
public class LinearSolverFactory {
public static LinearSolver newLinearSolver(Problem problem) {
try {
LinearSolver solver = (LinearSolver) Class.forName(
"javax.constraints.linear.impl.LinearSolver").newInstance();
solver.setProblem(problem);
problem.setSolver(solver);
return solver;
} catch (Exception e) {
throw new RuntimeException(
"LinearSolverFactory: Can not create an instance of the class javax.constraints.impl.LinearSolver",
e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy