name: Math: public AlgorithmBase

synopsis:

g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_algo.a

#include <Math.h>

Math();
Math(const Math& arg);
const String& className() const;
boolean setNumOperands(long num);
boolean setFunction(const String& functions);
boolean setOperation(const String& operations);
boolean compute(VectorFloat& output, const VectorFloat& input);
quick start:

// compute Y = 2.0 * X1 + 3.0 * X2 + 2.0
//
Math math;
math.setConstant(2.0);
math.setWeight(L"2.0, 3.0");

VectorFloat input;
VectorFloat output;
VectorFloat result;

input.assign(L"1.1, 4.0, 1.5, 2.3, 1.0, 1.0, 0.0, 0.0");
math.compute(output, input);
description:

This class allows users to build arbitrary mathematical expressions using a set of predefined building blocks. A general description of the capabilities of this class is summarized by this equation:


A formal description of the options available in this class is given below:


Notes:
  1. The behavior of these options are the same for all functions supported. See the definition of the enumeration named FUNCTION above for an exhaustive list.

  2. All function choices are implemented the same way as shown in these two examples. The selection of functions available is based on the math functions available in the Math Scalar classes.
  3. Note that the input values can be matrices and vectors. In this case, limited linear algebra options (e.g., INVERSE, TRANSPOSE) are supported in addition to the normal math function (e.g., ADD).
This class is best described through a simple example:


This would be implemented by assigning the following parameters:


The first portion of this mathematical expression, corresponding to operand no. 0, is implemented using the ASSIGN operation and a LOG function, along with a weight of 0.5. The next part of the expression is implemented using an ADD operation and a ATAN function. The third part is implemented with the MULT operation and COS function. As you can see, the operation specification for a particular operand refers to the operator to the left of the operand.

The Math class is a vital part of isip_transform since it allows users to do somewhat arbitrary operations on feature values that might not be available through a standard algorithm class.

dependencies:

public constants: error codes:

protected data:

required public methods:

class-specific public methods:

private methods:

examples:

notes: