public interface Budget
Budget
interface of every operation it does, and ask at the
places where it can stop prematurely if it should. This models the arrival of
a new data point in the stream, before there was enough time to insert the
current one.Modifier and Type | Method and Description |
---|---|
void |
doubleAddition()
Inform the
Budget class that a double addition has been
performed by the tree. |
void |
doubleAddition(int number)
Inform the
Budget that a certain number of double additions
have been performed. |
void |
doubleDivision()
Inform the
Budget class that a double division has
been performed by the tree. |
void |
doubleDivision(int number)
Inform the
Budget that a certain number of double divisions
have been performed. |
void |
doubleMultiplication()
Inform the
Budget class that a double multiplicaton has
been performed by the tree. |
void |
doubleMultiplication(int number)
Inform the
Budget that a certain number of double
multiplications have been performed. |
boolean |
hasMoreTime()
A function for the tree to ask if there is budget(time) left.
|
void |
integerAddition()
Inform the
Budget class that an integer addition has been
performed by the tree. |
void |
integerAddition(int number)
Inform the
Budget that a certain number of integer additions
have been done. |
void |
integerDivision()
Inform the
Budget class that a integer division has
been performed by the tree. |
void |
integerDivision(int number)
Inform the
Budget that a certain number of integer divisions
have been performed. |
void |
integerMultiplication()
Inform the
Budget class that a integer multiplicaton has
been performed by the tree. |
void |
integerMultiplication(int number)
Inform the
Budget that a certain number of integer
multiplications have been performed. |
boolean hasMoreTime()
boolean
that is true
if the tree
should go on, false
otherwise.void integerAddition()
Budget
class that an integer addition has been
performed by the tree.void integerAddition(int number)
Budget
that a certain number of integer additions
have been done.number
- the number of additions done.void doubleAddition()
Budget
class that a double addition has been
performed by the tree.void doubleAddition(int number)
Budget
that a certain number of double additions
have been performed.number
- the number of additions done.void integerMultiplication()
Budget
class that a integer multiplicaton has
been performed by the tree.void integerMultiplication(int number)
Budget
that a certain number of integer
multiplications have been performed.number
- the number of multiplication done.void doubleMultiplication()
Budget
class that a double multiplicaton has
been performed by the tree.void doubleMultiplication(int number)
Budget
that a certain number of double
multiplications have been performed.number
- the number of multiplications done.void integerDivision()
Budget
class that a integer division has
been performed by the tree.void integerDivision(int number)
Budget
that a certain number of integer divisions
have been performed.number
- the number of division done.void doubleDivision()
Budget
class that a double division has
been performed by the tree.void doubleDivision(int number)
Budget
that a certain number of double divisions
have been performed.number
- the number of divisions done.Copyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.