Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrorOutRangeOfW x out of range of Width ErrorOutRangeOfW = errors.New("out of range of width") // ErrorOutRangeOfH y out of range of Height ErrorOutRangeOfH = errors.New("out of range of height") )
Functions ¶
func StateSliceMatched ¶
Types ¶
type Matrix ¶
type Matrix struct {
// contains filtered or unexported fields
}
Matrix is a matrix data type width:3 height: 4 for [3][4]int
func (*Matrix) Iterate ¶
func (m *Matrix) Iterate(dir ScanDirection, f IterateFunc)
Iterate the Matrix with loop direction ROW major or COLUMN major
type ScanDirection ¶
type ScanDirection uint
ScanDirection scan matrix driection
const ( // ROW for row first ROW ScanDirection = 1 // COLUMN for column first COLUMN ScanDirection = 2 )
type State ¶
type State uint16
State value of matrix map[][]
const ( // StateFalse 0xffff FALSE StateFalse State = 0xffff // ZERO 0x0 FALSE ZERO State = 0xeeee // StateTrue 0x0 TRUE StateTrue State = 0x0 // StateInit 0x9999 use for initial state StateInit State = 0x9999 // StateVersion 0x4444 StateVersion State = 0x4444 // StateFormat 0x7777 for persisted state StateFormat State = 0x7777 // StateFinder 0x8000 to locate matrix and recognize it. StateFinder State = 0x8000 )
Click to show internal directories.
Click to hide internal directories.