Package hussam.math.operations.extra

Provides extra functionality to this package.

See:
          Description

Class Summary
CustomFunctionFactoryThis is custom function factory.
DynamicExpressionReaderThis class Function as a factory for Expression Readers, However this factory returns a dynamic ExpressionReader which uses a DynamicFunctionFactory.
DynamicFunctionFactoryThis factory creates CustomFunctions that have thies expression changed.
DynamicOperatorSourceWrapper 
 

Package hussam.math.operations.extra Description

Provides extra functionality to this package. This package acts like an addOn for all packages used under the operations package. For example:

  1. 1- it adds to operations package a CustomFunction class, and a DynamicFunction class, which models two types of Functions which can be dynamicaly created.
  2. 2- it adds to the Factory package a CustomFunctionFactory and a DynamicFunctionFactory which acts as factories for the functions discussed in point one. 3- it adds to the dataBase package a DynamicOperatorSourceWrapper class, which can be used to generate adhoc DynamicFunctionFactories easily. 4- it uses the parser package in a custom way.
For example, to create a CustomFunction, first create a CustomFunctionFactory:
CustomFunctionFactory fac=new CustomFuctionFactory(
                            "Size", 
                            "This Function Calculates the size of a Recatangular 3D Object.", 
                            "Abs(length) * Abs(height) * Abs(width)");
Function f=fac.getNewOperator();
f.setOperation(0, new ConstantNumber(10));//length variable
f.setOperation(1,new ConstantNumber(20));//height variable
f.setOperation(2,new ConstantNumber(30));//width variable
System.out.println(f.result()); // output: 6000.0

Notice that the factory is automatically added to the default OperatorFactoryDB

Function size = OperatorFactoryDB.getInstance().getFunction("Size");
size.setOperation(0, new Variable("x"));
etc..

Package Specification

This package relay heavily on all packages.

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see: