Behavior

org.appliedtopology.tda4j.plot.Behavior
See theBehavior companion object
enum Behavior

What a control does to the item it is attached to. A behavior is a small value: attach one or several (a + b) to a mark of a Panel, and the page shows the item accordingly whenever the control moves; the same behaviors give a still picture at any value of the control (Interactive.at), which is how a talk's frames are made.

  • Behavior.Shown: the item is there while the control's value v has from <= v < until. A simplex that enters the filtration at f is shown from f; a class that lives on [b, d) is shown from b until d.
  • Behavior.Follows: a coordinate of the item (of one or both ends of a segment, or of a rule) is the control's value held between lo and hi. A rule that follows the control is the movable line; a segment that follows it between b and d is a bar growing until the line passes its death. In a 3-D scene a point, a segment, a triangle or a ball follows too, in any of the three coordinates, and the scene keeps its place in the picture (see Panel.Spatial).
  • Behavior.Radius: the radius of the discs of a mark (data units) is factor times the control's value: the balls whose overlaps a Vietoris-Rips or Cech complex records.
  • Behavior.Selects: pointing at the item (or clicking it) chooses a key of a Selection. What the item looks like does not change; other items react.
  • Behavior.Selected: the item is there while a key is chosen in a Selection: a ring around a point, a cycle over the input. Together with Behavior.Selects on the item that stands for the same thing in another panel, this links the views.
  • Behavior.Custom: your own. The page calls the function you register under kind (see Interactive.withScript); a still picture shows the item as it was drawn.

Attributes

Companion
object
Experimental
true
Source
Interactive.scala
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

final case class Custom(kind: String, control: String, args: Vector[String])

A behavior of your own: kind names the function that handles it (at least two characters, letters, digits or -), and args are the strings it is given.

A behavior of your own: kind names the function that handles it (at least two characters, letters, digits or -), and args are the strings it is given.

Attributes

Source
Interactive.scala
final case class Follows(control: String, coordinate: Coordinate, ends: Ends, lo: Double, hi: Double)

coordinate of ends is the value of control, no less than lo and no more than hi. A coordinate that is Z belongs to a 3-D layer.

coordinate of ends is the value of control, no less than lo and no more than hi. A coordinate that is Z belongs to a 3-D layer.

Attributes

Source
Interactive.scala
final case class Radius(control: String, factor: Double)

The radius, in data units, of the discs of the mark is factor times the value of control.

The radius, in data units, of the discs of the mark is factor times the value of control.

Attributes

Source
Interactive.scala
final case class Selected(control: String, key: Int)

The item is shown while key is chosen in the selection named control.

The item is shown while key is chosen in the selection named control.

Attributes

Source
Interactive.scala
final case class Selects(control: String, key: Int)

Pointing at the item chooses key in the selection named control; clicking pins it (see Selection).

Pointing at the item chooses key in the selection named control; clicking pins it (see Selection).

Attributes

Source
Interactive.scala
final case class Shown(control: String, from: Double, until: Double)

Shown while from <= v < until for the value v of control.

Shown while from <= v < until for the value v of control.

Attributes

Source
Interactive.scala