validates

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2015 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IndexShouldBeInRange

func IndexShouldBeInRange(rows, columns, row, column int)

func ShapeShouldBeMultipliable

func ShapeShouldBeMultipliable(m, n HasShape)

func ShapeShouldBePositive

func ShapeShouldBePositive(row, column int)

func ShapeShouldBeSame

func ShapeShouldBeSame(m, n HasShape)

func ViewShouldBeInBase added in v0.1.3

func ViewShouldBeInBase(base, view *types.Shape, offset *types.Index)

Types

type HasShape

type HasShape interface {
	Shape() (rows, columns int)
	Rows() int
	Columns() int
}

type Panic

type Panic int
const (
	NON_POSITIVE_SIZE_PANIC Panic = iota
	DIFFERENT_SIZE_PANIC
	NOT_MULTIPLIABLE_PANIC
	OUT_OF_RANGE_PANIC
	INVALID_ELEMENTS_PANIC
	INVALID_VIEW_PANIC
)

func (Panic) String

func (i Panic) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL