struct UnicodePlot::MatrixView(T)

Overview

A small internal view over Array(Array(T)).

MatrixView intentionally supports only Array(Array(T)) for now. It centralizes validation for matrix-shaped plot inputs:

It is used by heatmap, spy, contourplot, surfaceplot, and imageplot. MatrixView is not a general AbstractMatrix abstraction.

Defined in:

unicode_plot/matrix.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(rows : Array(Array(T))) #

[View source]

Instance Method Detail

def [](row : Int32, col : Int32) : T #

[View source]
def each_cell(& : Int32, Int32, T -> ) #

[View source]
def empty? : Bool #

[View source]
def ncols : Int32 #

[View source]
def nrows : Int32 #

[View source]
def rows : Array(Array(T)) #

[View source]
def shape : Tuple(Int32, Int32) #

[View source]