|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.nabla.forward.analysis.ClassDifferentiator
public class ClassDifferentiator
Differentiator for classes using forward mode.
This differentiator transforms classes implementing the
UnivariateFunction
interface and convert
them to classes implementing the UnivariateDifferentiableFunction
interface.
The differentiator creates a new class in the same package as the primitive class and which only preserve a private reference to the primitive instance. They access the current value of all necessary primitive instance fields thanks to reflection and bypassing access restrictions.
The original class bytecode is not changed at all.
Constructor Summary | |
---|---|
ClassDifferentiator(Class<? extends org.apache.commons.math3.analysis.UnivariateFunction> primitiveClass,
Set<String> mathClasses)
Simple constructor. |
Method Summary | |
---|---|
void |
differentiateMethod(String name,
String primitiveDesc,
String derivativeDesc)
Differentiate a method. |
org.objectweb.asm.tree.ClassNode |
getDerivedClass()
Get the derived class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassDifferentiator(Class<? extends org.apache.commons.math3.analysis.UnivariateFunction> primitiveClass, Set<String> mathClasses) throws DifferentiationException, IOException
primitiveClass
- primitive classmathClasses
- math implementation classes
DifferentiationException
- if class cannot be differentiated
IOException
- if class cannot be readMethod Detail |
---|
public void differentiateMethod(String name, String primitiveDesc, String derivativeDesc) throws DifferentiationException
name
- of the methodprimitiveDesc
- descriptor of the method in the primitive classderivativeDesc
- descriptor of the method in the derivative class
DifferentiationException
- if method cannot be differentiatedpublic org.objectweb.asm.tree.ClassNode getDerivedClass()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |