case class Mergeable[Obs, T](base: StateValueFn[Obs, T])(implicit T: Semigroup[T]) extends StateValueFn[Obs, T] with Product with Serializable
StateValueFn implementation that merges values passed to update into
the value stored by the base StateValueFn using the supplied Semigroup's
plus
function.
- Source
- StateValueFn.scala
- Alphabetic
- By Inheritance
- Mergeable
- Serializable
- Serializable
- Product
- Equals
- StateValueFn
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Mergeable(base: StateValueFn[Obs, T])(implicit T: Semigroup[T])
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
- val base: StateValueFn[Obs, T]
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fold[U](prepare: (U) ⇒ T, present: (T) ⇒ U): StateValueFn[Obs, U]
Transforms this StateValueFn into a new instance that applies the supplied
prepare
to all incoming values before they're learned, and presents tracked T instances using thepresent
fn before returning them via stateValue.Transforms this StateValueFn into a new instance that applies the supplied
prepare
to all incoming values before they're learned, and presents tracked T instances using thepresent
fn before returning them via stateValue.- Definition Classes
- StateValueFn
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
mergeable(implicit T: Semigroup[T]): StateValueFn[Obs, T]
Returns a StateValueFn instance that uses the supplied semigroup T to merge values into this current StateValueFn.
Returns a StateValueFn instance that uses the supplied semigroup T to merge values into this current StateValueFn.
- T
Semigroup instance used to merge values.
- Definition Classes
- StateValueFn
-
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()
-
def
seen: Iterable[Obs]
Returns an Iterable of all observations associated with some internally tracked value T.
Returns an Iterable of all observations associated with some internally tracked value T.
- Definition Classes
- Mergeable → StateValueFn
-
def
stateValue(obs: Obs): T
Returns the stored value associated with the given observation.
Returns the stored value associated with the given observation.
- Definition Classes
- Mergeable → StateValueFn
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toEvaluator[A, R, S[_]]: StateValue[Obs, A, R, T, S]
TODO fill in.
TODO fill in.
- Definition Classes
- StateValueFn
-
def
update(obs: Obs, value: T): StateValueFn[Obs, T]
Absorb a new value for the supplied observation.
Absorb a new value for the supplied observation. The behavior of this function is implementation dependent; some might ignore the value, some might merge it in to an existing set of values, some might completely replace the stored state.
This implementation replaces uses a Semigroup[T] to merge the supplied value in to whatever value is stored in the underlying m.
- Definition Classes
- Mergeable → StateValueFn
-
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()
edit this text on github
ScalaRL
This is the API documentation for the ScalaRL functional reinforcement learning library.
Further documentation for ScalaRL can be found at the documentation site.
Check out the ScalaRL package list for all the goods.