Java Doc for Polynomial.java in  » Science » jscience-4.3.1 » org » jscience » mathematics » function » 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 » jscience 4.3.1 » org.jscience.mathematics.function 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jscience.mathematics.function.Polynomial

Polynomial
public class Polynomial extends Function implements Ring<Polynomial<R>>(Code)

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. For example:[code] Variable> varX = new Variable.Local>("x"); Polynomial> x = Polynomial.valueOf(Amount.valueOf(1, SI.METER), varX); and Variable varX = new Variable.Local("x"); Polynomial x = Polynomial.valueOf(Complex.ONE, varX);[/code] are two different polynomials, the first one operates on physical org.jscience.physics.amount.Amount measures , whereas the second operates on org.jscience.mathematics.number.Complex complex numbers.

Terms (others than Term.ONE ONE ) having zero (additive identity) for coefficient are automatically removed.


author:
   Jean-Marie Dautelle
version:
   3.1, April 1, 2006


Field Summary
final  FastMap<Term, R>_termToCoef
    

Constructor Summary
 Polynomial()
     Default constructor.

Method Summary
public  Polynomial<R>compose(Polynomial<R> that)
     Returns the composition of this polynomial with the one specified.
Parameters:
  that - the polynomial for which the return value is passed asargument to this function.
public  Function<Z, R>compose(Function<Z, R> that)
    
public  Polynomial<R>copy()
     Returns a copy of this polynomial javolution.context.AllocatorContext allocated by the calling thread (possibly on the stack).
public  Polynomial<R>differentiate(Variable<R> v)
    
public  booleanequals(Object obj)
    
public  Revaluate()
    
final public  RgetCoefficient(Term term)
     Returns the coefficient for the specified term.
Parameters:
  term - the term for which the coefficient is returned.
public  intgetOrder(Variable<R> v)
     Returns the order of this polynomial for the specified variable.
public  Set<Term>getTerms()
     Returns the terms of this polynomial.
public  List<Variable<R>>getVariables()
    
public  inthashCode()
    
public  Polynomial<R>integrate(Variable<R> v)
    
public  Polynomial<R>minus(Polynomial<R> that)
     Returns the difference of two polynomials.
Parameters:
  that - the polynomial being subtracted.
public  Function<R, R>minus(Function<R, R> that)
    
public  Polynomial<R>opposite()
     Returns the opposite of this polynomial.
public  Polynomial<R>plus(R constantValue)
     Returns the sum of this polynomial with a constant polynomial having the specified value (convenience method).
Parameters:
  constantValue - the value of the constant polynomial to add.
public  Polynomial<R>plus(Polynomial<R> that)
     Returns the sum of two polynomials.
Parameters:
  that - the polynomial being added.
public  Function<R, R>plus(Function<R, R> that)
    
public  Polynomial<R>pow(int n)
    
public  Polynomial<R>times(R constantValue)
     Returns the product of this polynomial with a constant polynomial having the specified value (convenience method).
Parameters:
  constantValue - the value of the constant polynomial to multiply.
public  Polynomial<R>times(Polynomial<R> that)
     Returns the product of two polynomials.
Parameters:
  that - the polynomial multiplier.
public  Function<R, R>times(Function<R, R> that)
    
public  TexttoText()
    
public static  Polynomial<R>valueOf(R coefficient, Variable<R> variable)
     Returns an univariate polynomial of degree one with the specified coefficient multiplier.
Parameters:
  coefficient - the coefficient for the variable of degree 1.
public static  Polynomial<R>valueOf(R coefficient, Term term)
     Returns a polynomial corresponding to the specified Term term with the specified coefficient multiplier.
Parameters:
  coefficient - the coefficient multiplier.

Field Detail
_termToCoef
final FastMap<Term, R> _termToCoef(Code)
Holds the terms to coefficients mapping (never empty, holds Term.ONE when constant)




Constructor Detail
Polynomial
Polynomial()(Code)
Default constructor.




Method Detail
compose
public Polynomial<R> compose(Polynomial<R> that)(Code)
Returns the composition of this polynomial with the one specified.
Parameters:
  that - the polynomial for which the return value is passed asargument to this function. the polynomial (this o that)
throws:
  FunctionException - if this function is not univariate.



compose
public Function<Z, R> compose(Function<Z, R> that)(Code)



copy
public Polynomial<R> copy()(Code)
Returns a copy of this polynomial javolution.context.AllocatorContext allocated by the calling thread (possibly on the stack). an identical and independant copy of this polynomial.



differentiate
public Polynomial<R> differentiate(Variable<R> v)(Code)



equals
public boolean equals(Object obj)(Code)



evaluate
public R evaluate()(Code)



getCoefficient
final public R getCoefficient(Term term)(Code)
Returns the coefficient for the specified term.
Parameters:
  term - the term for which the coefficient is returned. the coefficient for the specified term or nullif this polynomial does not contain the specified term.



getOrder
public int getOrder(Variable<R> v)(Code)
Returns the order of this polynomial for the specified variable. the polynomial order relative to the specified variable.



getTerms
public Set<Term> getTerms()(Code)
Returns the terms of this polynomial. this polynomial's terms.



getVariables
public List<Variable<R>> getVariables()(Code)



hashCode
public int hashCode()(Code)



integrate
public Polynomial<R> integrate(Variable<R> v)(Code)



minus
public Polynomial<R> minus(Polynomial<R> that)(Code)
Returns the difference of two polynomials.
Parameters:
  that - the polynomial being subtracted. this - that



minus
public Function<R, R> minus(Function<R, R> that)(Code)



opposite
public Polynomial<R> opposite()(Code)
Returns the opposite of this polynomial. - this



plus
public Polynomial<R> plus(R constantValue)(Code)
Returns the sum of this polynomial with a constant polynomial having the specified value (convenience method).
Parameters:
  constantValue - the value of the constant polynomial to add. this + Constant.valueOf(constantValue)



plus
public Polynomial<R> plus(Polynomial<R> that)(Code)
Returns the sum of two polynomials.
Parameters:
  that - the polynomial being added. this + that



plus
public Function<R, R> plus(Function<R, R> that)(Code)



pow
public Polynomial<R> pow(int n)(Code)



times
public Polynomial<R> times(R constantValue)(Code)
Returns the product of this polynomial with a constant polynomial having the specified value (convenience method).
Parameters:
  constantValue - the value of the constant polynomial to multiply. this · Constant.valueOf(constantValue)



times
public Polynomial<R> times(Polynomial<R> that)(Code)
Returns the product of two polynomials.
Parameters:
  that - the polynomial multiplier. this · that



times
public Function<R, R> times(Function<R, R> that)(Code)



toText
public Text toText()(Code)



valueOf
public static Polynomial<R> valueOf(R coefficient, Variable<R> variable)(Code)
Returns an univariate polynomial of degree one with the specified coefficient multiplier.
Parameters:
  coefficient - the coefficient for the variable of degree 1.
Parameters:
  variable - the variable for this polynomial. valueOf(coefficient, Term.valueOf(variable, 1))



valueOf
public static Polynomial<R> valueOf(R coefficient, Term term)(Code)
Returns a polynomial corresponding to the specified Term term with the specified coefficient multiplier.
Parameters:
  coefficient - the coefficient multiplier.
Parameters:
  term - the term multiplicand. coefficient * term



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