Class

cogdebugger.ui.fieldvisualizations.matrix

MatrixComponentsView

Related Doc: package matrix

Permalink

class MatrixComponentsView extends WrapPanel with EventDrivenViewer with ZoomProperty with RestorableState with ToolbarItems

An alternative view for matrix fields that decomposes the field into collections of like components rather than displaying individual matrices, analogous to the VectorComponents view defined for vector fields. This view is most useful for large fields of small matrices.

In the same way that a vector is a collection of components (x, y, z, ...) a matrix is a collection of components - it just happens to be a tensor of a higher dimension. Just as we could collect all the x's from all the vectors in a vector field and display them together, we can collect the first elements from all the matrices and display them together, and we could do the same for the second element, and the third, and so on.

Consider this 2x3 field of 2x2 matrices, rendered the "normal" or intuitive way (like MatrixMemoryView does). The outer indices tell you the location of a particular tensor (matrix) within the field, the inner indices tell you the location of the element within the tensor:

0, 0            0, 1            0, 2
+------+------+ +------+------+ +------+------+
| 0, 0 | 0, 1 | | 0, 0 | 0, 1 | | 0, 0 | 0, 1 |
+------+------+ +------+------+ +------+------+
| 1, 0 | 1, 1 | | 1, 0 | 1, 1 | | 1, 0 | 1, 1 |
+------+------+ +------+------+ +------+------+

0, 0            0, 1            0, 2
+------+------+ +------+------+ +------+------+
| 0, 0 | 0, 1 | | 0, 0 | 0, 1 | | 0, 0 | 0, 1 |
+------+------+ +------+------+ +------+------+
| 1, 0 | 1, 1 | | 1, 0 | 1, 1 | | 1, 0 | 1, 1 |
+------+------+ +------+------+ +------+------+

Each individual matrix has a component (0, 0), (0, 1), (1, 0), and so forth. Displayed as above, we have many small matrices. We can instead gather all the (0, 0) tensor elements and display them together, then do the same for the (0, 1) tensor elements and so on. The outer indices now refer to the element index within tensors, and the inner index which of the tensors in the field a particular element came from.

0, 0 in tenors         0, 1 in tensors
+------+------+------+ +------+------+------+
| 0, 0 | 0, 1 | 0, 0 | | 0, 0 | 0, 1 | 0, 0 |
+------+------+------+ +------+------+------+
| 1, 0 | 1, 1 | 1, 0 | | 1, 0 | 1, 1 | 1, 0 |
+------+------+------+ +------+------+------+

0, 0 in tensors        0, 1 in tensors
+------+------+------+ +------+------+------+
| 0, 0 | 0, 1 | 0, 0 | | 0, 0 | 0, 1 | 0, 0 |
+------+------+------+ +------+------+------+
| 1, 0 | 1, 1 | 1, 0 | | 1, 0 | 1, 1 | 1, 0 |
+------+------+------+ +------+------+------+

This swapping of indices compacts the visualization for this particular matrix field a bit - rather than many small images, we have a few larger ones.

Created by gonztobi on 4/23/2014.

Linear Supertypes
ToolbarItems, RestorableState, ZoomProperty, Zoomable, EventDrivenViewer, ProbeListener, Viewer, WrapPanel, FlowPanel, Wrapper, SequentialContainer, Panel, Wrapper, Container, Component, UIElement, LazyPublisher, Publisher, Reactor, Proxy, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MatrixComponentsView
  2. ToolbarItems
  3. RestorableState
  4. ZoomProperty
  5. Zoomable
  6. EventDrivenViewer
  7. ProbeListener
  8. Viewer
  9. WrapPanel
  10. FlowPanel
  11. Wrapper
  12. SequentialContainer
  13. Panel
  14. Wrapper
  15. Container
  16. Component
  17. UIElement
  18. LazyPublisher
  19. Publisher
  20. Reactor
  21. Proxy
  22. AnyRef
  23. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MatrixComponentsView(fieldType: libcog.FieldType)

    Permalink

Type Members

  1. class Content extends BufferWrapper[Component]

    Permalink
    Attributes
    protected
    Definition Classes
    Wrapper
  2. trait SuperMixin extends JComponent

    Permalink
    Attributes
    protected
    Definition Classes
    Component
  3. class Worker extends SwingWorker[Unit, Unit]

    Permalink
    Definition Classes
    EventDrivenViewer

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val BipolarProperty: BooleanProperty

    Permalink
  5. val FloatingMaxProperty: BooleanProperty

    Permalink
  6. val InvertProperty: BooleanProperty

    Permalink

    Controls color key.

    Controls color key. Normal mode (invert off) shows minimum values as black and maximums as white.

  7. val ZoomProperty: FloatProperty

    Permalink
    Definition Classes
    ZoomProperty
  8. val _contents: Content

    Permalink
    Attributes
    protected
    Definition Classes
    Wrapper
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def background: Color

    Permalink
    Definition Classes
    UIElement
  11. def background_=(c: Color): Unit

    Permalink
    Definition Classes
    UIElement
  12. def border: Border

    Permalink
    Definition Classes
    Component
  13. def border_=(b: Border): Unit

    Permalink
    Definition Classes
    Component
  14. def bounds: Rectangle

    Permalink
    Definition Classes
    UIElement
  15. var busy: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    EventDrivenViewer
  16. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. val contents: Buffer[Component]

    Permalink
    Definition Classes
    Wrapper → Wrapper → SequentialContainer → Container
  18. def cursor: Cursor

    Permalink
    Definition Classes
    UIElement
  19. def cursor_=(c: Cursor): Unit

    Permalink
    Definition Classes
    UIElement
  20. def deafTo(ps: Publisher*): Unit

    Permalink
    Definition Classes
    Reactor
  21. var disallowNegativeZoom: Boolean

    Permalink
    Definition Classes
    ZoomProperty
  22. def displayable: Boolean

    Permalink
    Definition Classes
    UIElement
  23. def enabled: Boolean

    Permalink
    Definition Classes
    Component
  24. def enabled_=(b: Boolean): Unit

    Permalink
    Definition Classes
    Component
  25. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  26. def equals(that: Any): Boolean

    Permalink
    Definition Classes
    Proxy → Any
  27. def fieldShape: Shape

    Permalink
  28. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  29. def focusable: Boolean

    Permalink
    Definition Classes
    Component
  30. def focusable_=(b: Boolean): Unit

    Permalink
    Definition Classes
    Component
  31. def font: Font

    Permalink
    Definition Classes
    UIElement
  32. def font_=(f: Font): Unit

    Permalink
    Definition Classes
    UIElement
  33. def foreground: Color

    Permalink
    Definition Classes
    UIElement
  34. def foreground_=(c: Color): Unit

    Permalink
    Definition Classes
    UIElement
  35. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  36. def hGap: Int

    Permalink
    Definition Classes
    FlowPanel
  37. def hGap_=(n: Int): Unit

    Permalink
    Definition Classes
    FlowPanel
  38. def hasFocus: Boolean

    Permalink
    Definition Classes
    Component
  39. def hashCode(): Int

    Permalink
    Definition Classes
    Proxy → Any
  40. def ignoreRepaint: Boolean

    Permalink
    Definition Classes
    UIElement
  41. def ignoreRepaint_=(b: Boolean): Unit

    Permalink
    Definition Classes
    UIElement
  42. var initP: JComponent

    Permalink
    Definition Classes
    Component
  43. def inputVerifier: (Component) ⇒ Boolean

    Permalink
    Definition Classes
    Component
  44. def inputVerifier_=(v: (Component) ⇒ Boolean): Unit

    Permalink
    Definition Classes
    Component
  45. def isBusy: Boolean

    Permalink
    Definition Classes
    EventDrivenViewerProbeListener
  46. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  47. def listenTo(ps: Publisher*): Unit

    Permalink
    Definition Classes
    Reactor
  48. val listeners: RefSet[Reaction] { val underlying: scala.collection.mutable.HashSet[scala.ref.Reference[scala.swing.Reactions.Reaction]] }

    Permalink
    Attributes
    protected
    Definition Classes
    Publisher
  49. def locale: Locale

    Permalink
    Definition Classes
    UIElement
  50. def location: Point

    Permalink
    Definition Classes
    UIElement
  51. def locationOnScreen: Point

    Permalink
    Definition Classes
    UIElement
  52. def maximumSize: Dimension

    Permalink
    Definition Classes
    UIElement
  53. def maximumSize_=(x: Dimension): Unit

    Permalink
    Definition Classes
    UIElement
  54. def minimumSize: Dimension

    Permalink
    Definition Classes
    UIElement
  55. def minimumSize_=(x: Dimension): Unit

    Permalink
    Definition Classes
    UIElement
  56. object mouse

    Permalink
    Definition Classes
    Component
  57. def name: String

    Permalink
    Definition Classes
    Component
  58. def name_=(s: String): Unit

    Permalink
    Definition Classes
    Component
  59. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  60. def notify(event: ProbeEvent): Unit

    Permalink
    Definition Classes
    EventDrivenViewerProbeListener
  61. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  62. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  63. def onFirstSubscribe(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Component → UIElement → LazyPublisher
  64. def onLastUnsubscribe(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    UIElement → LazyPublisher
  65. def opaque: Boolean

    Permalink
    Definition Classes
    Component
  66. def opaque_=(b: Boolean): Unit

    Permalink
    Definition Classes
    Component
  67. def paint(g: Graphics2D): Unit

    Permalink
    Definition Classes
    Component
  68. def paintBorder(g: Graphics2D): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Component
  69. def paintChildren(g: Graphics2D): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Component
  70. def paintComponent(g: Graphics2D): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Component
  71. lazy val peer: JPanel with SuperMixin

    Permalink
    Definition Classes
    WrapPanel → FlowPanel → Panel → Wrapper → Component → UIElement
  72. def preferredSize: Dimension

    Permalink
    Definition Classes
    UIElement
  73. def preferredSize_=(x: Dimension): Unit

    Permalink
    Definition Classes
    UIElement
  74. val properties: ArrayBuffer[Property[_]]

    Permalink

    A list of properties that should be persisted when the app closes, and restored the next time it's launched.

    A list of properties that should be persisted when the app closes, and restored the next time it's launched. A common example of a persistent is the zoom/magnification level of the viewer. Be sure to add any relevenant properties to this list in your Viewer subclasses!

    Definition Classes
    Viewer
  75. def propertiesTag: NodeSeq

    Permalink

    Returns the XML representation of this viewer's properties, suitable for saving into a file.

    Returns the XML representation of this viewer's properties, suitable for saving into a file.

    Definition Classes
    Viewer
  76. def publish(e: Event): Unit

    Permalink
    Definition Classes
    Publisher
  77. val reactions: Reactions

    Permalink
    Definition Classes
    Reactor
  78. def repaint(rect: Rectangle): Unit

    Permalink
    Definition Classes
    UIElement
  79. def repaint(): Unit

    Permalink
    Definition Classes
    UIElement
  80. def requestFocus(): Unit

    Permalink
    Definition Classes
    Component
  81. def requestFocusInWindow(): Boolean

    Permalink
    Definition Classes
    Component
  82. def reset(): Unit

    Permalink

    Resets the viewer its initial state.

    Resets the viewer its initial state. In particular, clears the tracked min/max data so that the Floating Max option continues to work.

    Definition Classes
    MatrixComponentsViewViewer
  83. def restore(elem: Node): Unit

    Permalink

    Restore this object to the state described in the given XML node.

    Restore this object to the state described in the given XML node.

    Definition Classes
    MatrixComponentsViewRestorableState
  84. def revalidate(): Unit

    Permalink
    Definition Classes
    Component
  85. def save: Elem

    Permalink

    Encode the state of this object into an XML node.

    Encode the state of this object into an XML node.

    Definition Classes
    MatrixComponentsViewRestorableState
  86. def self: Component

    Permalink
    Definition Classes
    UIElement → Proxy
  87. def showing: Boolean

    Permalink
    Definition Classes
    UIElement
  88. def size: Dimension

    Permalink
    Definition Classes
    UIElement
  89. def subscribe(listener: Reaction): Unit

    Permalink
    Definition Classes
    LazyPublisher → Publisher
  90. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  91. def tensorShape: Shape

    Permalink
  92. def toString(): String

    Permalink
    Definition Classes
    Component → Proxy → AnyRef → Any
  93. def toolbarComponents: Seq[ComponentGroup]

    Permalink

    A sequence of components related to this viewer that belong in a panel other than the main display (usually a toolbar).

    A sequence of components related to this viewer that belong in a panel other than the main display (usually a toolbar). These components may be controls (buttons, combo boxes, spinners etc.) or small labels/displays (e.g. min/max, color key).

    Definition Classes
    MatrixComponentsViewToolbarItems
  94. def toolkit: Toolkit

    Permalink
    Definition Classes
    UIElement
  95. def tooltip: String

    Permalink
    Definition Classes
    Component
  96. def tooltip_=(t: String): Unit

    Permalink
    Definition Classes
    Component
  97. def unsubscribe(listener: Reaction): Unit

    Permalink
    Definition Classes
    LazyPublisher → Publisher
  98. def update(data: libcog.MatrixFieldReader, simTime: Long): Unit

    Permalink
  99. def update(src: AnyRef, data: libcog.AbstractFieldMemory, simTime: Long): Unit

    Permalink

    Updates the visualization based on the contents of data.

    Updates the visualization based on the contents of data.

    src

    The field or object that generated the data argument

    data

    New field data that needs to be rendered by this viewer

    simTime

    The ComputeGraph's step count at the time the data argument was generated

    Definition Classes
    MatrixComponentsViewViewer
  100. def updateMinMax(panel: MatrixComponentPanel): Unit

    Permalink

    Update the legend for the given panel with the latest min/max values.

  101. def vGap: Int

    Permalink
    Definition Classes
    FlowPanel
  102. def vGap_=(n: Int): Unit

    Permalink
    Definition Classes
    FlowPanel
  103. def visible: Boolean

    Permalink
    Definition Classes
    UIElement
  104. def visible_=(b: Boolean): Unit

    Permalink
    Definition Classes
    UIElement
  105. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  106. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  107. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  108. def xLayoutAlignment: Double

    Permalink
    Definition Classes
    Component
  109. def xLayoutAlignment_=(x: Double): Unit

    Permalink
    Definition Classes
    Component
  110. def xmlToProperties(node: Node): Unit

    Permalink

    Parses the XML tag produced by the propertiesTag method and restores any saved valued to this Viewer.

    Parses the XML tag produced by the propertiesTag method and restores any saved valued to this Viewer.

    Definition Classes
    Viewer
  111. def yLayoutAlignment: Double

    Permalink
    Definition Classes
    Component
  112. def yLayoutAlignment_=(y: Double): Unit

    Permalink
    Definition Classes
    Component
  113. def zoomIn(): Unit

    Permalink

    Increase zoom level by zDelta.

    Increase zoom level by zDelta.

    Definition Classes
    ZoomPropertyZoomable
  114. var zoomIncrement: Float

    Permalink

    Controls size of zoom steps

    Controls size of zoom steps

    Definition Classes
    MatrixComponentsViewZoomProperty
  115. def zoomLevel: Float

    Permalink
    Definition Classes
    ZoomProperty
  116. def zoomLevel_=(value: Float): Unit

    Permalink
    Definition Classes
    ZoomProperty
  117. def zoomOut(): Unit

    Permalink

    Decrease zoom level by zDelta.

    Decrease zoom level by zDelta.

    Definition Classes
    ZoomPropertyZoomable
  118. var zoomType: ZoomType

    Permalink

    Controls how zDelta is applied to the current zoom level.

    Controls how zDelta is applied to the current zoom level. In Additive, a delta is added to the current zoom level; in Multiplicative mode, the zoom level is multiplied by delta when zooming in, and by its reciprocal when zooming out.

    Default zoom type is additive. If you change it to multiplicative, you should probably ensure that the default zDelta is something other than 1f, as multiplying by one probably won't do anything.

    Definition Classes
    ZoomProperty

Inherited from ToolbarItems

Inherited from RestorableState

Inherited from ZoomProperty

Inherited from Zoomable

Inherited from EventDrivenViewer

Inherited from ProbeListener

Inherited from Viewer

Inherited from WrapPanel

Inherited from FlowPanel

Inherited from Wrapper

Inherited from SequentialContainer

Inherited from Panel

Inherited from Wrapper

Inherited from Container

Inherited from Component

Inherited from UIElement

Inherited from LazyPublisher

Inherited from Publisher

Inherited from Reactor

Inherited from Proxy

Inherited from AnyRef

Inherited from Any

Ungrouped