Source Code Cross Referenced for GammaMatrix.java in  » Science » JSci » JSci » physics » quantum » 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 » JSci » JSci.physics.quantum 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package JSci.physics.quantum;
002:
003:        import JSci.maths.Complex;
004:        import JSci.maths.matrices.ComplexSquareMatrix;
005:        import JSci.maths.fields.ComplexField;
006:
007:        /**
008:         * The GammaMatrix class provides an object for encapsulating the gamma matrices.
009:         * @version 1.2
010:         * @author Mark Hale
011:         */
012:        public final class GammaMatrix extends ComplexSquareMatrix {
013:            private static final Complex y0_D[][] = {
014:                    { ComplexField.ONE, ComplexField.ZERO, ComplexField.ZERO,
015:                            ComplexField.ZERO },
016:                    { ComplexField.ZERO, ComplexField.ONE, ComplexField.ZERO,
017:                            ComplexField.ZERO },
018:                    { ComplexField.ZERO, ComplexField.ZERO,
019:                            ComplexField.MINUS_ONE, ComplexField.ZERO },
020:                    { ComplexField.ZERO, ComplexField.ZERO, ComplexField.ZERO,
021:                            ComplexField.MINUS_ONE } };
022:            private static final Complex y1_D[][] = {
023:                    { ComplexField.ZERO, ComplexField.ZERO, ComplexField.ZERO,
024:                            ComplexField.ONE },
025:                    { ComplexField.ZERO, ComplexField.ZERO, ComplexField.ONE,
026:                            ComplexField.ZERO },
027:                    { ComplexField.ZERO, ComplexField.MINUS_ONE,
028:                            ComplexField.ZERO, ComplexField.ZERO },
029:                    { ComplexField.MINUS_ONE, ComplexField.ZERO,
030:                            ComplexField.ZERO, ComplexField.ZERO } };
031:            private static final Complex y2_D[][] = {
032:                    { ComplexField.ZERO, ComplexField.ZERO, ComplexField.ZERO,
033:                            ComplexField.I },
034:                    { ComplexField.ZERO, ComplexField.ZERO,
035:                            ComplexField.MINUS_I, ComplexField.ZERO },
036:                    { ComplexField.ZERO, ComplexField.MINUS_I,
037:                            ComplexField.ZERO, ComplexField.ZERO },
038:                    { ComplexField.I, ComplexField.ZERO, ComplexField.ZERO,
039:                            ComplexField.ZERO } };
040:            private static final Complex y3_D[][] = {
041:                    { ComplexField.ZERO, ComplexField.ZERO, ComplexField.ONE,
042:                            ComplexField.ZERO },
043:                    { ComplexField.ZERO, ComplexField.ZERO, ComplexField.ZERO,
044:                            ComplexField.MINUS_ONE },
045:                    { ComplexField.MINUS_ONE, ComplexField.ZERO,
046:                            ComplexField.ZERO, ComplexField.ZERO },
047:                    { ComplexField.ZERO, ComplexField.ONE, ComplexField.ZERO,
048:                            ComplexField.ZERO } };
049:            private static final Complex y5_D[][] = {
050:                    { ComplexField.ZERO, ComplexField.ZERO, ComplexField.ONE,
051:                            ComplexField.ZERO },
052:                    { ComplexField.ZERO, ComplexField.ZERO, ComplexField.ZERO,
053:                            ComplexField.ONE },
054:                    { ComplexField.ONE, ComplexField.ZERO, ComplexField.ZERO,
055:                            ComplexField.ZERO },
056:                    { ComplexField.ZERO, ComplexField.ONE, ComplexField.ZERO,
057:                            ComplexField.ZERO } };
058:            private static final Complex y0_M[][] = {
059:                    { ComplexField.ZERO, ComplexField.ZERO, ComplexField.ZERO,
060:                            ComplexField.I },
061:                    { ComplexField.ZERO, ComplexField.ZERO,
062:                            ComplexField.MINUS_I, ComplexField.ZERO },
063:                    { ComplexField.ZERO, ComplexField.I, ComplexField.ZERO,
064:                            ComplexField.ZERO },
065:                    { ComplexField.MINUS_I, ComplexField.ZERO,
066:                            ComplexField.ZERO, ComplexField.ZERO } };
067:            private static final Complex y1_M[][] = {
068:                    { ComplexField.ZERO, ComplexField.ZERO, ComplexField.I,
069:                            ComplexField.ZERO },
070:                    { ComplexField.ZERO, ComplexField.ZERO, ComplexField.ZERO,
071:                            ComplexField.MINUS_I },
072:                    { ComplexField.I, ComplexField.ZERO, ComplexField.ZERO,
073:                            ComplexField.ZERO },
074:                    { ComplexField.ZERO, ComplexField.MINUS_I,
075:                            ComplexField.ZERO, ComplexField.ZERO } };
076:            private static final Complex y2_M[][] = {
077:                    { ComplexField.I, ComplexField.ZERO, ComplexField.ZERO,
078:                            ComplexField.ZERO },
079:                    { ComplexField.ZERO, ComplexField.I, ComplexField.ZERO,
080:                            ComplexField.ZERO },
081:                    { ComplexField.ZERO, ComplexField.ZERO,
082:                            ComplexField.MINUS_I, ComplexField.ZERO },
083:                    { ComplexField.ZERO, ComplexField.ZERO, ComplexField.ZERO,
084:                            ComplexField.MINUS_I } };
085:            private static final Complex y3_M[][] = {
086:                    { ComplexField.ZERO, ComplexField.ZERO, ComplexField.ZERO,
087:                            ComplexField.MINUS_I },
088:                    { ComplexField.ZERO, ComplexField.ZERO,
089:                            ComplexField.MINUS_I, ComplexField.ZERO },
090:                    { ComplexField.ZERO, ComplexField.MINUS_I,
091:                            ComplexField.ZERO, ComplexField.ZERO },
092:                    { ComplexField.MINUS_I, ComplexField.ZERO,
093:                            ComplexField.ZERO, ComplexField.ZERO } };
094:            private static final Complex y5_M[][] = {
095:                    { ComplexField.ZERO, ComplexField.ZERO, ComplexField.I,
096:                            ComplexField.ZERO },
097:                    { ComplexField.ZERO, ComplexField.ZERO, ComplexField.ZERO,
098:                            ComplexField.I },
099:                    { ComplexField.MINUS_I, ComplexField.ZERO,
100:                            ComplexField.ZERO, ComplexField.ZERO },
101:                    { ComplexField.ZERO, ComplexField.MINUS_I,
102:                            ComplexField.ZERO, ComplexField.ZERO } };
103:            /**
104:             * Gamma 0 matrix (Dirac representation).
105:             */
106:            public static final GammaMatrix Y0_D = new GammaMatrix(y0_D);
107:            /**
108:             * Gamma 1 matrix (Dirac representation).
109:             */
110:            public static final GammaMatrix Y1_D = new GammaMatrix(y1_D);
111:            /**
112:             * Gamma 2 matrix (Dirac representation).
113:             */
114:            public static final GammaMatrix Y2_D = new GammaMatrix(y2_D);
115:            /**
116:             * Gamma 3 matrix (Dirac representation).
117:             */
118:            public static final GammaMatrix Y3_D = new GammaMatrix(y3_D);
119:            /**
120:             * Gamma 5 matrix (Dirac representation).
121:             */
122:            public static final GammaMatrix Y5_D = new GammaMatrix(y5_D);
123:            /**
124:             * Gamma 0 matrix (Weyl representation).
125:             */
126:            public static final GammaMatrix Y0_W = Y5_D;
127:            /**
128:             * Gamma 1 matrix (Weyl representation).
129:             */
130:            public static final GammaMatrix Y1_W = Y1_D;
131:            /**
132:             * Gamma 2 matrix (Weyl representation).
133:             */
134:            public static final GammaMatrix Y2_W = Y2_D;
135:            /**
136:             * Gamma 3 matrix (Weyl representation).
137:             */
138:            public static final GammaMatrix Y3_W = Y3_D;
139:            /**
140:             * Gamma 5 matrix (Weyl representation).
141:             */
142:            public static final GammaMatrix Y5_W = Y0_D;
143:            /**
144:             * Gamma 0 matrix (Majorana representation).
145:             */
146:            public static final GammaMatrix Y0_M = new GammaMatrix(y0_M);
147:            /**
148:             * Gamma 1 matrix (Majorana representation).
149:             */
150:            public static final GammaMatrix Y1_M = new GammaMatrix(y1_M);
151:            /**
152:             * Gamma 2 matrix (Majorana representation).
153:             */
154:            public static final GammaMatrix Y2_M = new GammaMatrix(y2_M);
155:            /**
156:             * Gamma 3 matrix (Majorana representation).
157:             */
158:            public static final GammaMatrix Y3_M = new GammaMatrix(y3_M);
159:            /**
160:             * Gamma 5 matrix (Majorana representation).
161:             */
162:            public static final GammaMatrix Y5_M = new GammaMatrix(y5_M);
163:
164:            /**
165:             * Constructs a gamma matrix.
166:             */
167:            private GammaMatrix(Complex gammaArray[][]) {
168:                super (gammaArray);
169:            }
170:
171:            /**
172:             * Returns true if this matrix is unitary.
173:             */
174:            public boolean isUnitary() {
175:                return true;
176:            }
177:
178:            /**
179:             * Returns the determinant.
180:             */
181:            public Complex det() {
182:                return ComplexField.MINUS_ONE;
183:            }
184:
185:            /**
186:             * Returns the trace.
187:             */
188:            public Complex trace() {
189:                return ComplexField.ZERO;
190:            }
191:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.