com.ijchart.xychart.function
Class PowerFunction

java.lang.Object
  extended by com.ijchart.xychart.function.PowerFunction
All Implemented Interfaces:
IFunction, java.io.Serializable

public class PowerFunction
extends java.lang.Object
implements IFunction, java.io.Serializable

Title: IJChart

Description: a chart library for the Java(tm) platform.

幂函数,形式为y=a*x^b.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.
See Also:
Serialized Form

Constructor Summary
PowerFunction(double a, double b)
          构造幂函数.
 
Method Summary
 boolean equals(java.lang.Object obj)
          覆盖equals方法.
 double getA()
          返回系数a.
 double getB()
          返回系数b.
 double getY(double x)
          根据x值计算y值.
 int hashCode()
          计算hashcode值.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PowerFunction

public PowerFunction(double a,
                     double b)
构造幂函数.

Parameters:
a - double 系数a.
b - double 系数b.
Method Detail

getA

public double getA()
返回系数a.

Returns:
double 系数a.

getB

public double getB()
返回系数b.

Returns:
double 系数b.

getY

public double getY(double x)
根据x值计算y值.

Specified by:
getY in interface IFunction
Parameters:
x - double x值.
Returns:
double y值.

equals

public boolean equals(java.lang.Object obj)
覆盖equals方法.

Overrides:
equals in class java.lang.Object
Parameters:
obj - Object
Returns:
boolean

toString

public java.lang.String toString()
覆盖toString()方法.

Overrides:
toString in class java.lang.Object
Returns:
String

hashCode

public int hashCode()
计算hashcode值.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this object.