/* SCCS - %W% - %G% - %U% */
// Copyright: Copyright (c) 1997 University of Southern California Brain Project.
// Copyright: This software may be freely copied provided the toplevel
// Copyright: COPYRIGHT file is included with each such copy.
// Copyright: Email nsl@java.usc.edu.
////////////////////////////////////////////////////////////
//
// Step threshold routines
//
//
/**
Step threshold routines.
There are four basic format for the evaluation method in
this routine:
1, eval(a) -> c
a is the input parameter to pass the threshold function:
if a < 0, c = 0,
else c = 1.
2. eval(dest, a) -> c
a is the parameter of the threshold function and
dest is the temporary space to hold the result.
The method returns the reference to dest.
3. eval(a, kx1, ky1, ky2) -> c
if a < kx1, c = ky1,
else, c = ky2.
2. eval(dest, a, kx1, ky1, ky2) -> c
a is the parameter of the threshold function and
dest is the temporary space to hold the result.
The method returns the reference to dest.
*/
////////////////////////////////////////////////////////////////////////////////
// step functions
package nslj.src.math;
import nslj.src.lang.*;
public final class NslStep {
// doubles
private static double value(double x, double kx1, double ky1, double ky2) {
if (x