Source Code Cross Referenced for Wavelet7.java in  » Science » JSci » JSci » maths » wavelet » daubechies7 » 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.maths.wavelet.daubechies7 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package JSci.maths.wavelet.daubechies7;
002:
003:        import JSci.maths.wavelet.*;
004:
005:        /******************************************
006:         * Daubechies wavelets adapted to the
007:         * interval by Meyer. Thanks to Pierre Vial
008:         * for the filters.
009:         * @author Daniel Lemire
010:         *****************************************/
011:        public final class Wavelet7 extends MultiscaleFunction implements 
012:                Cloneable {
013:            private int n0;
014:            private int k;
015:            private static final Daubechies7 cdf = new Daubechies7();
016:
017:            public Wavelet7(int N0, int K) {
018:                setParameters(N0, K);
019:            }
020:
021:            /*******************************
022:             * Return a String representation
023:             * of the object
024:             ********************************/
025:            public String toString() {
026:                String ans = new String("[n0=");
027:                ans.concat(Integer.toString(n0));
028:                ans.concat("][k=");
029:                ans.concat(Integer.toString(k));
030:                ans.concat("]");
031:                return (ans);
032:            }
033:
034:            /*****************************************
035:             * Check if another object is equal to this
036:             * Wavelet8 object
037:             ******************************************/
038:            public boolean equals(Object a) {
039:                if ((a != null) && (a instanceof  Wavelet7)) {
040:                    Wavelet7 iv = (Wavelet7) a;
041:                    return (this .dimension(0) == iv.dimension(0))
042:                            && (this .position() == iv.position());
043:                }
044:                return false;
045:            }
046:
047:            public Wavelet7() {
048:            }
049:
050:            /****************************************
051:             * This method is used to compute
052:             * how the number of scaling functions
053:             * changes from on scale to the other.
054:             * Basically, if you have k scaling
055:             * function and a filter of type t, you'll
056:             * have 2*k+t scaling functions at the
057:             * next scale (dyadic case).
058:             * Notice that this method assumes
059:             * that one is working with the dyadic
060:             * grid while the method "previousDimension"
061:             * define in the interface "filter" doesn't.
062:             ******************************************/
063:            public int getFilterType() {
064:                return (cdf.filtretype);
065:            }
066:
067:            /**********************************************
068:             * Set the parameters for this object
069:             * @param N0 number of scaling function on the
070:             *   scale of this object
071:             * @param K position or number of this object
072:             * @exception IllegalScalingException if N0 is not
073:             *   large enough
074:             ***********************************************/
075:            public void setParameters(int N0, int K) {
076:                if (N0 < cdf.minlength) {
077:                    throw new IllegalScalingException(N0, cdf.minlength);
078:                }
079:                n0 = N0;
080:                k = K;
081:            }
082:
083:            /********************************************
084:             * Return a copy of this object
085:             *********************************************/
086:            public Object clone() {
087:                Wavelet7 w = (Wavelet7) super .clone();
088:                w.n0 = n0;
089:                w.k = k;
090:                return (w);
091:            }
092:
093:            /************************************************
094:             * Return as an array the sampled values
095:             * of the function
096:             * @param j number of iterations
097:             *************************************************/
098:            public double[] evaluate(int j) {
099:                return (cdf.evalWavelet(n0, k, j));
100:            }
101:
102:            /****************************************************
103:             * Given that the wavelet is written in terms of
104:             * a scale containing dimension() scaling functions and
105:             * going jfin scales ahead (iterating jfin times),
106:             * tells you how many scaling functions you'll need.
107:             * @param jfin number of iterations
108:             ******************************************************/
109:            public int dimension(int jfin) {
110:                return (Cascades.dimension(n0, jfin + 1, cdf.filtretype));
111:            }
112:
113:            /****************************************************
114:             * Number of scaling functions at scale where this
115:             * wavelet belongs.
116:             *****************************************************/
117:            public int dimension() {
118:                return (dimension(0));
119:            }
120:
121:            /****************************************
122:             * Tells you what is the number of this
123:             * wavelet. Wavelets are numbered from left
124:             * to right with the one at the left
125:             * boundary being noted 0.
126:             *****************************************/
127:            public int position() {
128:                return (k);
129:            }
130:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.