Click here to Skip to main content
15,884,955 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.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_03) on Fri Oct 12 20:27:18 EEST 2007 -->
<TITLE>
Evaluator (JEL API)
</TITLE>

<META NAME="date" CONTENT="2007-10-12">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="Evaluator (JEL API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Evaluator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../gnu/jel/DVMap.html" title="class in gnu.jel"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../gnu/jel/ImageLoader.html" title="class in gnu.jel"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html?gnu/jel/Evaluator.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Evaluator.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
gnu.jel</FONT>
<BR>
Class Evaluator</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>gnu.jel.Evaluator</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>Evaluator</B><DT>extends java.lang.Object</DL>
</PRE>

<P>
This is the main frontend to JEL.
 <P>It is intended for compilation of algebraic expressions involving 
 functions.
 <P> Syntax allows variables, which can be either a public fields of
 certain objects or functions with no arguments.  If a method like
 "<TT>double x() {}</TT>;" is defined in the dynamic library class
 (see <tt>gnu.jel.Library</tt> documentation on how to do this), an
 expression "<TT>sin(x)</TT>" will call the method "<TT>x()</TT>" (
 and function <TT>Math.sin()</TT> ) each time it is evaluated.
 Static methods in namespace are assumed to be stateless (unless
 this default behaviour is explicitly overridden, as is necessary
 for <tt>Math.random()</tt>) and will be called at compile time if
 their arguments are known.
 <P>It is possible to have any type of intermediate object
 throughout the calculation as long as types of the function return
 values and parameters stay compatible. The compiler can
 do all the type conversions permissible in Java language and more 
 (e.g. between reflection wrappers <tt>java.lang.Integer</tt>,... and
 primitives). Widening type conversions (not leading to precision loss)
 are applied by JEL automatically, narrowing should be explicitly 
 requested.
 <P>There is variant of the "compile" function with three arguments,
 which allows to fix the type of the expression result. For example:
 <PRE>
 CompiledExpression expression=compile("2*6+6",lib,Double.TYPE); 
 </PRE> 
 will produce a compiled expression, whose return type is always
 <TT>double</TT>. For additional information on how to use this
 feature to eliminate object allocation overhead see
 <TT>gnu.jel.CompiledExpression</TT> documentation.
 
 <P> Care should be taken during the assembly of static and dynamic libraries
 to avoid conflicts and unexpected return types.

 <P>(c) 1998-2003, by Konstantin Metlov<BR>
 Prague, CZ
<P>

<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../gnu/jel/CompiledExpression.html" title="class in gnu.jel"><CODE>CompiledExpression</CODE></A>, 
<A HREF="../../gnu/jel/Library.html" title="class in gnu.jel"><CODE>Library</CODE></A></DL>
<HR>

<P>
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;<A HREF="../../gnu/jel/ClassFile.html" title="class in gnu.jel">ClassFile</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../gnu/jel/Evaluator.html#cf_orig">cf_orig</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;<A HREF="../../gnu/jel/LocalMethod.html" title="class in gnu.jel">LocalMethod</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../gnu/jel/Evaluator.html#eval_methods">eval_methods</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../gnu/jel/Evaluator.html#retID_patchback">retID_patchback</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../gnu/jel/Evaluator.html#retIDC_patchback">retIDC_patchback</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../gnu/jel/Evaluator.html#Evaluator()">Evaluator</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../gnu/jel/CompiledExpression.html" title="class in gnu.jel">CompiledExpression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../gnu/jel/Evaluator.html#compile(java.lang.String, gnu.jel.Library)">compile</A></B>(java.lang.String&nbsp;expression,
        <A HREF="../../gnu/jel/Library.html" title="class in gnu.jel">Library</A>&nbsp;lib)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compiles expression, resolving the function names in the library.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../gnu/jel/CompiledExpression.html" title="class in gnu.jel">CompiledExpression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../gnu/jel/Evaluator.html#compile(java.lang.String, gnu.jel.Library, java.lang.Class)">compile</A></B>(java.lang.String&nbsp;expression,
        <A HREF="../../gnu/jel/Library.html" title="class in gnu.jel">Library</A>&nbsp;lib,
        java.lang.Class&nbsp;resultType)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compiles expression, resolving the function names in the library.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../gnu/jel/Evaluator.html#compileBits(java.lang.String, gnu.jel.Library)">compileBits</A></B>(java.lang.String&nbsp;expression,
            <A HREF="../../gnu/jel/Library.html" title="class in gnu.jel">Library</A>&nbsp;lib)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compiles expression, resolving the function names in the library.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../gnu/jel/Evaluator.html#compileBits(java.lang.String, gnu.jel.Library, java.lang.Class)">compileBits</A></B>(java.lang.String&nbsp;expression,
            <A HREF="../../gnu/jel/Library.html" title="class in gnu.jel">Library</A>&nbsp;lib,
            java.lang.Class&nbsp;resultType)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compiles expression, resolving the function names in the library.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="cf_orig"><!-- --></A><H3>
cf_orig</H3>
<PRE>
protected static <A HREF="../../gnu/jel/ClassFile.html" title="class in gnu.jel">ClassFile</A> <B>cf_orig</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="retID_patchback"><!-- --></A><H3>
retID_patchback</H3>
<PRE>
protected static int <B>retID_patchback</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="retIDC_patchback"><!-- --></A><H3>
retIDC_patchback</H3>
<PRE>
protected static int <B>retIDC_patchback</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>

<A NAME="eval_methods"><!-- --></A><H3>
eval_methods</H3>
<PRE>
protected static <A HREF="../../gnu/jel/LocalMethod.html" title="class in gnu.jel">LocalMethod</A>[] <B>eval_methods</B></PRE>
<DL>
<DL>
</DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="Evaluator()"><!-- --></A><H3>
Evaluator</H3>
<PRE>
public <B>Evaluator</B>()</PRE>
<DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="compile(java.lang.String, gnu.jel.Library, java.lang.Class)"><!-- --></A><H3>
compile</H3>
<PRE>
public static <A HREF="../../gnu/jel/CompiledExpression.html" title="class in gnu.jel">CompiledExpression</A> <B>compile</B>(java.lang.String&nbsp;expression,
                                         <A HREF="../../gnu/jel/Library.html" title="class in gnu.jel">Library</A>&nbsp;lib,
                                         java.lang.Class&nbsp;resultType)
                                  throws <A HREF="../../gnu/jel/CompilationException.html" title="class in gnu.jel">CompilationException</A></PRE>
<DL>
<DD>Compiles expression, resolving the function names in the library.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>expression</CODE> - is the expression to compile. i.e. "sin(666)" .<DD><CODE>lib</CODE> - Library of functions exported for use in expression.<DD><CODE>resultType</CODE> - identifies the type result should be converted to. Can
        be null, in this case the result type is not fixed.
<DT><B>Returns:</B><DD>Instance of the CompiledExpression subclass, implementing
   the specified expression evaluation.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../gnu/jel/CompilationException.html" title="class in gnu.jel">CompilationException</A></CODE> - if the expression is not
  syntactically or semantically correct.<DT><B>See Also:</B><DD><A HREF="../../gnu/jel/CompiledExpression.html" title="class in gnu.jel"><CODE>CompiledExpression</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="compileBits(java.lang.String, gnu.jel.Library, java.lang.Class)"><!-- --></A><H3>
compileBits</H3>
<PRE>
public static byte[] <B>compileBits</B>(java.lang.String&nbsp;expression,
                                 <A HREF="../../gnu/jel/Library.html" title="class in gnu.jel">Library</A>&nbsp;lib,
                                 java.lang.Class&nbsp;resultType)
                          throws <A HREF="../../gnu/jel/CompilationException.html" title="class in gnu.jel">CompilationException</A></PRE>
<DL>
<DD>Compiles expression, resolving the function names in the library.
 <P>This variant of compile allows to store expressions in a 
 <TT>java.io.OutputStream</TT> using Java serialization mechanism.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>expression</CODE> - is the expression to compile. i.e. "sin(666)" .<DD><CODE>lib</CODE> - Library of functions exported for use in expression.<DD><CODE>resultType</CODE> - identifies the type result should be converted to. Can
        be null, in this case the result type is not fixed.
<DT><B>Returns:</B><DD>Byte array, representing the expression
 in a standard Java classfile format. It can be conveniently 
 loaded (with renaming, if necessary)
 into Java VM using <tt>gnu.jel.ImageLoader</tt>.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../gnu/jel/CompilationException.html" title="class in gnu.jel">CompilationException</A></CODE> - if the expression is not
  syntactically or semantically correct.<DT><B>See Also:</B><DD><A HREF="../../gnu/jel/CompiledExpression.html" title="class in gnu.jel"><CODE>CompiledExpression</CODE></A>, 
<A HREF="../../gnu/jel/ImageLoader.html" title="class in gnu.jel"><CODE>ImageLoader</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="compile(java.lang.String, gnu.jel.Library)"><!-- --></A><H3>
compile</H3>
<PRE>
public static <A HREF="../../gnu/jel/CompiledExpression.html" title="class in gnu.jel">CompiledExpression</A> <B>compile</B>(java.lang.String&nbsp;expression,
                                         <A HREF="../../gnu/jel/Library.html" title="class in gnu.jel">Library</A>&nbsp;lib)
                                  throws <A HREF="../../gnu/jel/CompilationException.html" title="class in gnu.jel">CompilationException</A></PRE>
<DL>
<DD>Compiles expression, resolving the function names in the library.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>expression</CODE> - is the expression to compile. i.e. "sin(666)" .<DD><CODE>lib</CODE> - Library of functions exported for use in expression.
<DT><B>Returns:</B><DD>Instance of the CompiledExpression subclass, implementing
   the specified expression evaluation.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../gnu/jel/CompilationException.html" title="class in gnu.jel">CompilationException</A></CODE> - if the expression is not
  syntactically or semantically correct.<DT><B>See Also:</B><DD><A HREF="../../gnu/jel/CompiledExpression.html" title="class in gnu.jel"><CODE>CompiledExpression</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="compileBits(java.lang.String, gnu.jel.Library)"><!-- --></A><H3>
compileBits</H3>
<PRE>
public static byte[] <B>compileBits</B>(java.lang.String&nbsp;expression,
                                 <A HREF="../../gnu/jel/Library.html" title="class in gnu.jel">Library</A>&nbsp;lib)
                          throws <A HREF="../../gnu/jel/CompilationException.html" title="class in gnu.jel">CompilationException</A></PRE>
<DL>
<DD>Compiles expression, resolving the function names in the library.
 <P>This variant of compile allows to store expressions in a 
 <TT>java.io.OutputStream</TT> using Java serialization mechanism.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>expression</CODE> - is the expression to compile. i.e. "sin(666)" .<DD><CODE>lib</CODE> - Library of functions exported for use in expression.
<DT><B>Returns:</B><DD>Byte array, representing the expression
 in a standard Java classfile format. It can be conveniently 
 loaded (with renaming, if necessary)
 into Java VM using <tt>gnu.jel.ImageLoader</tt>.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../gnu/jel/CompilationException.html" title="class in gnu.jel">CompilationException</A></CODE> - if the expression is not
  syntactically or semantically correct.<DT><B>See Also:</B><DD><A HREF="../../gnu/jel/CompiledExpression.html" title="class in gnu.jel"><CODE>CompiledExpression</CODE></A>, 
<A HREF="../../gnu/jel/ImageLoader.html" title="class in gnu.jel"><CODE>ImageLoader</CODE></A></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Evaluator.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../gnu/jel/DVMap.html" title="class in gnu.jel"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../gnu/jel/ImageLoader.html" title="class in gnu.jel"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html?gnu/jel/Evaluator.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Evaluator.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
<i>Copyright &#169; 1998-2007 Konstantin L. Metlov All Rights Reserved.</i>
</BODY>
</HTML>

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