Java Doc for SimpleFunction.java in  » Science » jcm1-source » edu » hws » jcm » data » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Science » jcm1 source » edu.hws.jcm.data 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   edu.hws.jcm.data.SimpleFunction

SimpleFunction
public class SimpleFunction implements Function(Code)
An object belonging to this class is a function of one or more variables. It is defined by an expression, e, and a list of variables, which presumably can occur in e. The value of the function at arguments x1,x2,... is obtained by assigning the x's as the values of the variables and then evaluating the expression e.

Note: When the function is evaluated, the values of the variables that act as its parameters are saved and the variables are set to the values of the actual parameters provided for the function. After the evaluation, the saved values are restored. Usually, this is OK, but if setting the value of the variable has a side effect (such as changing the position of a VariableSlider), it could be a problem. So, don't use the variables associated with VariableSliders or VariableInputs in SimpleFunctions.

Note: A SimpleFunction is not a MathObject and does not have a name. It cannot be added to a Parser. If you want to do somethign like that, use an ExpressionFunction (defined in package edu.hws.jcm.functions).




Constructor Summary
public  SimpleFunction(Expression e, Variable v)
     Create the function of one variable such that the value of the function at x is obtained by temporarily assigning x as the value of the variable v and then evaluating e.
public  SimpleFunction(Expression e, Variable[] v)
     Create a function.

Method Summary
public  booleandependsOn(Variable x)
     Return true if the definition of this function depends in some way on the variable x.
public  Functionderivative(int wrt)
     Return the derivative of the function with repect to argument number wrt, where arguments are numbered starting from 1.
public  Functionderivative(Variable x)
     Return the derivative of the function with respect to the variable x.
public  intgetArity()
     Return the number of arguments of this function.
public  doublegetVal(double[] arguments)
     Find the value of the function at the argument values argument[0], argument[1]....
public  doublegetValueWithCases(double[] arguments, Cases cases)
     Find the value of the function at the argument values argument[0], argument[1]....


Constructor Detail
SimpleFunction
public SimpleFunction(Expression e, Variable v)(Code)
Create the function of one variable such that the value of the function at x is obtained by temporarily assigning x as the value of the variable v and then evaluating e. e and v should be non-null (or errors will result when the function is used. Note that evaluating the function will temporarily change the value of the variable.



SimpleFunction
public SimpleFunction(Expression e, Variable[] v)(Code)
Create a function. The arity of the function is the length of the array v. The value of the function at a given list of arguments is obtained by temporarily assigning the arguement values to the variables, and then returning the value of the expression. e and v should be non-null. Note that evaluating the function will temporarily change the values of the variables.




Method Detail
dependsOn
public boolean dependsOn(Variable x)(Code)
Return true if the definition of this function depends in some way on the variable x. (Note that the function does NOT depend on the variables that are being used as its parameters!)



derivative
public Function derivative(int wrt)(Code)
Return the derivative of the function with repect to argument number wrt, where arguments are numbered starting from 1.



derivative
public Function derivative(Variable x)(Code)
Return the derivative of the function with respect to the variable x. (Note that the derivative w.r.t one of the variables that are being used as the parameter of this function is ZERO!) To get the derivative with respect to the i-th parameter variable, call derivative(i).



getArity
public int getArity()(Code)
Return the number of arguments of this function.



getVal
public double getVal(double[] arguments)(Code)
Find the value of the function at the argument values argument[0], argument[1].... (If not enough arguments are supplied, an ArrayIndexOutOfBoundsException will be thrown. Extra arguments are ignored.)



getValueWithCases
public double getValueWithCases(double[] arguments, Cases cases)(Code)
Find the value of the function at the argument values argument[0], argument[1].... Information about "cases" is stored in the Cases parameter, if it is non-null. See the Cases class for more information.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.