trait RingBuffer[A] extends AnyRef
Represents a Ring Buffer that allows to store elements and to compute a function that sums them.
- Alphabetic
- By Inheritance
- RingBuffer
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
isFull: Boolean
Checks if the ring buffer is full or not
Checks if the ring buffer is full or not
- returns
true if it is full, false otherwise
-
abstract
def
maxOfElements(implicit num: Numeric[A]): A
Returns the maximum among the elements in this buffer.
Returns the maximum among the elements in this buffer.
- num
implicit parameter
- returns
The maximum element in the buffer
-
abstract
def
minOfElements(implicit num: Numeric[A]): A
Returns the minimum among the elements in this buffer.
Returns the minimum among the elements in this buffer.
- num
implicit parameter
- returns
The minimimum element in the buffer
-
abstract
def
push(elem: A): RingBuffer[A]
Push an element into the array buffer
Push an element into the array buffer
- elem
the element to be added in the ring buffer
- returns
A new, immutable, RingBuffer with the new element added
-
abstract
def
sumElements(implicit num: Numeric[A]): A
Compute the sum of the elements.
Compute the sum of the elements.
- num
implicit parameter
- returns
The sum of the elements
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()