edu.pdx.cs399J.rmi
Class EquationSolverImpl

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by edu.pdx.cs399J.rmi.EquationSolverImpl
All Implemented Interfaces:
EquationSolver, Serializable, Remote

public class EquationSolverImpl
extends UnicastRemoteObject
implements EquationSolver

Instances of this remote class reside in a server JVM and perform the work of solving an equation of the form Ax = b.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
EquationSolverImpl()
          Creates a new EquationSolverImpl.
 
Method Summary
static void main(String[] args)
          Main program that creates a new EquationSolverImpl and binds it into the RMI registry under a given name.
 double[] solve(double[][] matrix, double[] constants)
          Use Cholesky's algorithm to solve a linear system of equations of the Ax = b.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EquationSolverImpl

public EquationSolverImpl()
                   throws RemoteException
Creates a new EquationSolverImpl. Invokes UnicastRemoteObject's constructor to register this object with the RMI runtime.

Throws:
RemoteException
Method Detail

solve

public double[] solve(double[][] matrix,
                      double[] constants)
               throws RemoteException
Use Cholesky's algorithm to solve a linear system of equations of the Ax = b.

Specified by:
solve in interface EquationSolver
Parameters:
matrix - The A in Ax = b
constants - The b in Ax = b
Throws:
IllegalArgumentException - The number of rows and columns in the matrix are not the same
RemoteException - Something went wrong while communicating with the server

main

public static void main(String[] args)
Main program that creates a new EquationSolverImpl and binds it into the RMI registry under a given name.



Copyright © 2000-2009 Portland State University. All Rights Reserved.