|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.rwth.domains.templates.ComposedFunction
Implements functions by composition of two functions.
Inner classes inherited from class de.rwth.domains.Function |
Function.Tools |
Field Summary | |
protected Function |
f
The second function in this composition. |
protected Function |
g
The first function in this composition. |
Constructor Summary | |
ComposedFunction(Function f,
Function g)
Creates a new ComposedFunction instance. |
Method Summary | |
java.lang.Object |
apply(java.lang.Object x)
Applies this function to an argument and returns the result. |
boolean |
equals(java.lang.Object o)
|
Set |
getDomain()
Returns the domain of this function. |
Set |
getRange()
Returns the range (co-domain) of this function. |
static void |
main(java.lang.String[] args)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Function f
protected Function g
Constructor Detail |
public ComposedFunction(Function f, Function g) throws java.lang.IllegalArgumentException
ComposedFunction
instance. Read as "f
o
g
" in the usual mathematical sense: The resulting function applies
g
to an argument and subsequently f
to the result.f
- a Function
value: The second function.g
- a Function
value: The first function.java.lang.IllegalArgumentException
- if the range of g
is not the
domain of f
Method Detail |
public java.lang.Object apply(java.lang.Object x) throws FunctionException
Function
apply
in interface Function
de.rwth.domains.Function
x
- the argumentx
FunctionException
- if x
is not
an element of the
functions domain.
getDomain
public Set getDomain()
- Description copied from interface:
Function
- Returns the domain of this function.
- Specified by:
getDomain
in interface Function
- Following copied from interface:
de.rwth.domains.Function
- Returns:
- a value of type
Set
getRange
public Set getRange()
- Description copied from interface:
Function
- Returns the range (co-domain) of this function.
- Specified by:
getRange
in interface Function
- Following copied from interface:
de.rwth.domains.Function
- Returns:
- a value of type
Set
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
main
public static void main(java.lang.String[] args)
Overview
Package
Class
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD