sealed abstract class ISet[A] extends AnyRef
- Source
- ISet.scala
- See also
https://hackage.haskell.org/package/containers-0.5.7.1/docs/Data-Set.html
https://github.com/haskell/containers/blob/v0.5.7.1/Data/Set/Base.hs
- Alphabetic
- By Inheritance
- ISet
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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 \\(other: ISet[A])(implicit o: Order[A]): ISet[A]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def contains(x: A)(implicit o: Order[A]): Boolean
Alias for member
- final def delete(x: A)(implicit o: Order[A]): ISet[A]
- final def deleteAt(i: Int): ISet[A]
- final def deleteFindMax: (A, ISet[A])
- final def deleteFindMin: (A, ISet[A])
- final def deleteMax: ISet[A]
- final def deleteMin: ISet[A]
- final def difference(other: ISet[A])(implicit o: Order[A]): ISet[A]
- final def elemAt(i: Int): Option[A]
Alias for Foldable[ISet].index
- final def elems: IList[A]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def equals(other: Any): Boolean
- Definition Classes
- ISet → AnyRef → Any
- final def filter(p: (A) => Boolean): ISet[A]
- final def filterGt(a: Option[A])(implicit o: Order[A]): ISet[A]
- final def filterLt(a: Option[A])(implicit o: Order[A]): ISet[A]
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def findMax: Option[A]
- Annotations
- @tailrec()
- final def findMin: Option[A]
- Annotations
- @tailrec()
- final def foldLeft[B](z: B)(f: (B, A) => B): B
- final def foldRight[B](z: B)(f: (A, B) => B): B
- final def foldl[B](z: B)(f: (B, A) => B): B
- final def foldr[B](z: B)(f: (A, B) => B): B
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def hashCode(): Int
- Definition Classes
- ISet → AnyRef → Any
- final def insert(x: A)(implicit o: Order[A]): ISet[A]
- final def intersection(other: ISet[A])(implicit o: Order[A]): ISet[A]
- final def isEmpty: Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def isProperSubsetOf(other: ISet[A])(implicit o: Order[A]): Boolean
- final def isSubsetOf(other: ISet[A])(implicit o: Order[A]): Boolean
- final def lookupGE(x: A)(implicit o: Order[A]): Option[A]
- Annotations
- @tailrec()
- final def lookupGT(x: A)(implicit o: Order[A]): Option[A]
- Annotations
- @tailrec()
- final def lookupIndex(x: A)(implicit o: Order[A]): Option[Int]
- final def lookupLE(x: A)(implicit o: Order[A]): Option[A]
- Annotations
- @tailrec()
- final def lookupLT(x: A)(implicit o: Order[A]): Option[A]
- Annotations
- @tailrec()
- def map[B](f: (A) => B)(implicit arg0: Order[B]): ISet[B]
The
Functor
composition law only holds for functions that preserve equivalence, i.e.The
Functor
composition law only holds for functions that preserve equivalence, i.e. for functionsf
such that- ∀ a1, a2 ∈ A
-
Order[A].equal(a1, a2)
⇒Order[B].equal(f(a1), f(a2))
-
In the case when the equivalence implied by
Order[A]
is in fact _equality_, i.e. the finest equivalence, i.e. satisfying the _substitution property_ (which is the above property quantified over allf
, see Wikipedia page on Equality), the requirement holds for allf
by definition.When
Order
instances are viewed as "mere" equivalences (as opposed to equalities), we can loosely say thatISet
is an (endo-)functor in the category _Equiv_ of sets with an equivalence relation (where the morphishms are equivalence-preserving functions, i.e. exactly the functions satisfying the above requirement). By contrast, Functor instances are functors in the _Scala_ category, whose morphisms are arbitrary functions, including the ones that don't preserve equivalence.Note: this is not able to implement
Functor
due to theOrder
constraint on the destination type, however it still is a functor in the mathematical sense.Documentation as copied from the Haskell source:
-- | /O(n*log n)/. -- @'map' f s@ is the set obtained by applying @f@ to each element of @s@. -- -- It's worth noting that the size of the result may be smaller if, -- for some @(x,y)@, @x \/= y && f x == f y@
- ∀ a1, a2 ∈ A
- final def maxView: Option[(A, ISet[A])]
- final def member(x: A)(implicit o: Order[A]): Boolean
- Annotations
- @tailrec()
- def merge(other: ISet[A]): ISet[A]
- Attributes
- protected
- final def minView: Option[(A, ISet[A])]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notMember(x: A)(implicit o: Order[A]): Boolean
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def partition(p: (A) => Boolean): (ISet[A], ISet[A])
- final def split(x: A)(implicit o: Order[A]): (ISet[A], ISet[A])
- final def splitMember(x: A)(implicit o: Order[A]): (ISet[A], Boolean, ISet[A])
- final def splitRoot: IList[ISet[A]]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def toAscIList: IList[A]
- final def toAscList: List[A]
- final def toDescIList: IList[A]
- final def toDescList: List[A]
- final def toIList: IList[A]
- final def toList: List[A]
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def trim(a: Option[A], b: Option[A])(implicit o: Order[A]): ISet[A]
- final def union(other: ISet[A])(implicit o: Order[A]): ISet[A]
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()