org.jscience.mathematics.function

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 » jscience 4.3.1 » org.jscience.mathematics.function 
org.jscience.mathematics.function

Provides support for fairly simple symbolic math analysis (to solve algebraic equations, integrate, differentiate, calculate expressions, and so on).

{@link org.jscience.mathematics.function.Function Functions} defined in this package can be {@link org.jscience.mathematics.function.Variable multivariate} and operate on various kind of objects such as physical measurements, vectors, matrices, all types of numbers or even the functions themselves (functions of functions)! Here is an example using {@link org.jscience.mathematics.number.Complex complex} {@link org.jscience.mathematics.function.Polynomial polynomial} functions:[code] // Defines two local variables (x, y). Variable varX = new Variable.Local("x"); Variable varY = new Variable.Local("y"); // f(x) = ix² + 2x + 1 Polynomial x = Polynomial.valueOf(Complex.ONE, varX); Polynomial fx = x.pow(2).times(Complex.I).plus( x.times(Complex.valueOf(2, 0)).plus(Complex.ONE)); System.out.println(fx); System.out.println(fx.pow(2)); System.out.println(fx.differentiate(varX)); System.out.println(fx.integrate(varY)); System.out.println(fx.compose(fx)); // Calculates expression. varX.set(Complex.valueOf(2, 3)); System.out.println(fx.evaluate()); > [0.0 + 1.0i]x^2 + [2.0 + 0.0i]x + [1.0 + 0.0i] > [-1.0 + 0.0i]x^4 + [0.0 + 4.0i]x^3 + [4.0 + 2.0i]x^2 + [4.0 + 0.0i]x + [1.0 + 0.0i] > [0.0 + 2.0i]x + [2.0 + 0.0i] > [0.0 + 1.0i]x^2y + [2.0 + 0.0i]xy + [1.0 + 0.0i]y > [0.0 - 1.0i]x^4 + [-4.0 + 0.0i]x^3 + [-2.0 + 6.0i]x^2 + [4.0 + 4.0i]x + [3.0 + 1.0i] > -7.0 + 1.0i [/code]

Java Source File NameTypeComment
Constant.javaClass
DiscreteFunction.javaClass
Function.javaClass

This abstract class represents a mapping between two sets such that there is a unique element in the second set assigned to each element in the first set.

Functions can be discrete or continuous and multivariate functions (functions with multiple variables) are also supported as illustrated below:[code] // Defines local variables. Variable.Local varX = new Variable.Local("x"); Variable.Local varY = new Variable.Local("y"); // f(x, y) = x² + x·y + 1; Polynomial x = Polynomial.valueOf(Rational.ONE, varX); Polynomial y = Polynomial.valueOf(Rational.ONE, varY); Polynomial fx_y = x.pow(2).plus(x.times(y)).plus(Rational.ONE); System.out.println("f(x,y) = " + fx_y); // Evaluates f(1,0) System.out.println("f(1,0) = " + fx_y.evaluate(Rational.ONE, Rational.ZERO)); // Calculates df(x,y)/dx System.out.println("df(x,y)/dx = " + fx_y.differentiate(varX)); > f(x,y) = [1/1]x^2 + [1/1]xy + [1/1] > f(1,0) = 2/1 > df(x,y)/dx = [2/1]x + [1/1]y [/code]

Functions are often given by formula (e.g.

FunctionException.javaClass
Interpolator.javaInterface

This interface represents an estimator of the values at a certain point using surrounding points and values.

Polynomial.javaClass

This class represents a mathematical expression involving a sum of powers in one or more Variable variables multiplied by coefficients (such as x² + x·y + 3y²).

Polynomials are characterized by the type of variable they operate upon.

RationalFunction.javaClass This class represents the quotient of two Polynomial , it is also a Field field (invertible).
Term.javaClass This class represents the term of a Polynomial polynomial such as x·y².
Variable.javaInterface

This interface represents a symbol on whose value a Function depends.

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