FixedRange

semagrams.layout.FixedRange
case class FixedRange(from: Double, to: Double) extends Spacer

An implementation of Spacer that assigns from to 0 and to to n-1, with the rest of the elements evenly spaced between them.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Spacer
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def assignPos(i: Int, n: Int): Double

Positions the ith element of {0,...,n-1}

Positions the ith element of {0,...,n-1}

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def spaceBy[X, T](f: X => Option[T])(xs: Seq[X]): Map[X, Double]

Returns a map of element => position, where each element is assigned a position based on its index when xs is grouped by f.

Returns a map of element => position, where each element is assigned a position based on its index when xs is grouped by f.

Elements for which f returns None are not included in the map.

Attributes

`xs`

the list of things to assign positions to

f

the function to group xs by

Inherited from:
Spacer