de.rwth.domains.templates
Class KillGenBitVectorFunction
java.lang.Object
|
+--de.rwth.domains.templates.KillGenBitVectorFunction
- All Implemented Interfaces:
- Function
- public class KillGenBitVectorFunction
- extends java.lang.Object
- implements Function
Implements kill/gen functions over bit vectors. To determine the result of an
application to an argument, a function kills bits in the * argument and then
generates bits.
- Version:
- $Id: KillGenBitVectorFunction.java,v 1.2 2002/09/17 06:53:53 mohnen Exp $
- Author:
- Markus Mohnen
Field Summary |
protected int[] |
gens
The bit indices to generate. |
protected int[] |
kills
The bit indices to kill. |
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)
Mini test environment. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
kills
protected int[] kills
- The bit indices to kill.
gens
protected int[] gens
- The bit indices to generate.
KillGenBitVectorFunction
public KillGenBitVectorFunction(BitVectorLattice l,
int[] kills,
int[] gens)
- Creates a new
KillGenBitVectorFunction
instance from explicit
enumeration of kills and gens.
- Parameters:
l
- a BitVectorLattice
value: The bit vector lattice used as
domain and range.kills
- an int[]
value: The bit indices to kill.gens[]
- an int
value: The bit indices to generate.
KillGenBitVectorFunction
public KillGenBitVectorFunction(KillGenBitVectorFunction f,
KillGenBitVectorFunction g)
- Creates a new
KillGenBitVectorFunction
instance as composition of
two KillGenBitVectorFunction
. Just like ComposedFunction
does, but more efficient.
- Parameters:
f
- a KillGenBitVectorFunction
value: The second function in
the composition.g
- a KillGenBitVectorFunction
value: The first function in
the composition.
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
apply
public java.lang.Object apply(java.lang.Object x)
throws FunctionException
- Description copied from interface:
Function
- Applies this function to an argument and returns the result.
- Specified by:
apply
in interface Function
- Following copied from interface:
de.rwth.domains.Function
- Parameters:
x
- the argument- Returns:
- this function's value for argument
x
- Throws:
FunctionException
- if x
is not
an element of the
functions domain.
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)
- Mini test environment.
- Parameters:
args
- a String[]
value