org.jscience.mathematics.vector

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.vector 
org.jscience.mathematics.vector

Provides support for linear algebra in the form of {@link org.jscience.mathematics.vector.Matrix matrices} and {@link org.jscience.mathematics.vector.Vector vectors}.

With the {@link org.jscience.mathematics.vector.Matrix Matrix} class, you should be able to resolve linear systems of equations involving any kind of elements such as {@link org.jscience.mathematics.number.Rational Rational}, {@link org.jscience.mathematics.number.ModuloInteger ModuloInteger} (modulo operations), {@link org.jscience.mathematics.number.Complex Complex}, {@link org.jscience.mathematics.function.RationalFunction RationalFunction}, etc. The main requirement being that your element class implements the mathematical {@link org.jscience.mathematics.structure.Field Field} interface.

Most {@link org.jscience.mathematics.number numbers} and even invertible matrices themselves may implement this interface. Non-commutative multiplication is supported which allows for the resolution of systems of equations with invertible matrix coefficients (matrices of matrices).

For classes embedding automatic error calculation (e.g. {@link org.jscience.mathematics.number.Real Real} or {@link org.jscience.physics.amount.Amount Amount}), the error on the solution obtained tells you if can trust that solution or not (e.g. system close to singularity). The following example illustrates this point.

Let's say you have a simple electric circuit composed of 2 resistors in series with a battery. You want to know the voltage (U1, U2) at the nodes of the resistors and the current (I) traversing the circuit.[code] import static org.jscience.physics.units.SI.*; Amount R1 = Amount.valueOf(100, 1, OHM); // 1% precision. Amount R2 = Amount.valueOf(300, 3, OHM); // 1% precision. Amount U0 = Amount.valueOf(28, 0.01, VOLT); // ±0.01 V fluctuation. // Equations: U0 = U1 + U2 |1 1 0 | |U1| |U0| // U1 = R1 * I => |-1 0 R1| * |U2| = |0 | // U2 = R2 * I |0 -1 R2| |I | |0 | // // A * X = B // DenseMatrix> A = DenseMatrix.valueOf(new Amount[][] { { Amount.ONE, Amount.ONE, Amount.valueOf(0, OHM) }, { Amount.ONE.opposite(), Amount.ZERO, R1 }, { Amount.ZERO, Amount.ONE.opposite(), R2 } }); DenseVector> B = DenseVector.valueOf(new Amount[] { U0, Amount.valueOf(0, VOLT), Amount.valueOf(0, VOLT) }); Vector> X = A.solve(B); System.out.println(X); System.out.println(X.get(2).to(MILLI(AMPERE))); > {(7.0 ± 1.6E-1) V, (21.0 ± 1.5E-1) V, (7.0E-2 ± 7.3E-4) V/Ω} > (70.0 ± 7.3E-1) mA [/code] Because the {@link org.jscience.physics.amount.Amount Amount} class guarantees the accuracy/precision of its calculations. As long as the input resistances, voltage stay within their specification range then the current is guaranteed to be (70.0 ± 7.3E-1) mA. When the inputs have no error specified, the error on the result corresponds to calculations numeric errors only (which might increase significantly if the matrix is close to singularity).

Java Source File NameTypeComment
ComplexMatrix.javaClass

This class represents an optimized Matrix matrix implementation for Complex complex numbers.

Instances of this class can be created from ComplexVector , either as rows or columns if the matrix is transposed.

ComplexVector.javaClass
DenseMatrix.javaClass

This class represents a matrix made of DenseVector densevectors (as rows).

DenseVector.javaClass
DimensionException.javaClass Signals that an operation is performed upon vectors or matrices whose dimensions disagree.
Float64Matrix.javaClass

This class represents an optimized Matrix matrix implementation for Float64 64 bits floating-point numbers.

Instances of this class can be created from Float64Vector , either as rows or columns if the matrix is transposed.

Float64Vector.javaClass
LUDecomposition.javaClass
Matrix.javaClass

This class represents a rectangular table of elements of a ring-like algebraic structure.

Instances of this class can be used to resolve system of linear equations involving any kind of Field Field elements (e.g.

SparseMatrix.javaClass

This class represents a matrix made of SparseVector sparsevectors (as rows).

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