Click here to Skip to main content
15,884,176 members
Articles / Web Development / HTML

Continuous Wavelet Transforms, a Java Implementation

Rate me:
Please Sign up or sign in to vote.
4.31/5 (5 votes)
7 Mar 2015CPOL12 min read 29.8K   1.3K   10  
This article presents a Java example application that performs continuous wavelet transforms.
// This class is both used to resolve the dynamic variable names and
// to provide their values. These two functions can also be
// implemented by two different classes.
public class DVResolverProvider extends gnu.jel.DVMap {

    private java.util.HashMap<String,Object> properties=
	new java.util.HashMap<String,Object>();

    // adds a new property
    protected void addProperty(String name,Object value) {
	properties.put(name,value);
    };

    // implements the method of DVResolver interface,
    // used by the compiler to query about available dynamic
    // variables
    public String getTypeName(String name) {
	Object val=properties.get(name);
	if (val==null) return null; // dynamic variable does not exist
	if (val instanceof Data) return "Data";
	if (val instanceof String) return "String";
	// the type is not supported we say the variable is not defined
	return null;
    };
    
    // Next we have those YYY getXXXProperty(String) methods described in
    // the manual

    public Data getDataProperty(String name) {
	return (Data)properties.get(name);
    };

    public String getStringProperty(String name) {
	return (String)properties.get(name);
    };

};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder PEI Watershed Alliance, Inc.
United States United States
I am an analytical chemist and an educator. I program primarily to perform matrix computations for regression analysis, process signals, acquire data from sensors, and to control devices.

I participate in many open source development communities and Linux user forums. I do contract work for an environmental analytical laboratory, where I am primarily focused on LIMS programming and network administration.

I am a member of several community-interest groups such as the Prince Edward Island Watershed Alliance, the Lot 11 and Area Watershed Management Group, and the Petersham Historic Commission.

Comments and Discussions