object Idx
class Object
trait Matchable
class Any
Member
Mutable Indexed Collection
Mutable indexed collection provides methods to modify its content based on element position
Mutable Indexed Collection
Mutable indexed collection provides methods to modify its content based on element position
Observable Idx Collection
Observable Idx collection allows to track all the changes by subscribing to onChange
event
Observable Idx Collection
Observable Idx collection allows to track all the changes by subscribing to onChange
event
trait ObservableMutable[A] extends Idx.Observable[A] with Idx.Mutable[A] with Collection.ObservableMutable[A]
trait ObservableMutable[A] extends Idx.Observable[A] with Idx.Mutable[A] with Collection.ObservableMutable[A]
trait Permutation
Permutation is a precise definition on how elements within Int.Range should be reorganized
Consider ordering a buffer of integers. This could be accomplished it two steps:
1. Based on some Ordering, we create a [[Permutation]] object, which captures all necessary repositions
2. Apply permutation to the buffer
```
val buf = ~~(0, 3, 1, 2, 4).toBuffer
buf.~.tp // Prints: ~(0, 3, 1, 2, 4)
// Creating permutation based on comparator
val p = Idx.Permutation.sorting(buffer)
p.tp // Prints: Permutation{range=1 <>> 4,(1,3)(2,1)(3,2)}
p.reposition(buf) // Applying permutation
buf.~.tp // Prints ~(0, 1, 2, 3, 4)
```
trait Permutation
Permutation is a precise definition on how elements within Int.Range should be reorganized
Consider ordering a buffer of integers. This could be accomplished it two steps:
1. Based on some Ordering, we create a [[Permutation]] object, which captures all necessary repositions
2. Apply permutation to the buffer
```
val buf = ~~(0, 3, 1, 2, 4).toBuffer
buf.~.tp // Prints: ~(0, 3, 1, 2, 4)
// Creating permutation based on comparator
val p = Idx.Permutation.sorting(buffer)
p.tp // Prints: Permutation{range=1 <>> 4,(1,3)(2,1)(3,2)}
p.reposition(buf) // Applying permutation
buf.~.tp // Prints ~(0, 1, 2, 3, 4)
```
Alias
Def
@targetName("head_Opt")
First optional element
First optional element
Returns first elements or empty option for empty Idx
- Source
- __.scala
def orderedSearchBy[A](map: A => B, v: B, max: Int, extraFilter: A => Boolean)(using Ordering[B]): <>
- Source
- __.scala