Home Reference Source
import {EdgeIterator} from 'rabbit-hole'
public class | source

EdgeIterator

Implements:

  • Iterator
  • ,
  • Iterable

An edge iterator.

Constructor Summary

Public Constructor
public

constructor(edgeData: EdgeData, cellPosition: Vector3, cellSize: Number, c: Number, d: Number)

Constructs a new edge iterator.

Member Summary

Public Members
public

The amount of edges for each internal set of edges (X -> Y -> Z).

Method Summary

Public Methods
public

[Symbol.iterator](): EdteIterator

Returns this iterator.

public

next(): IteratorResult

Iterates over the edges.

public

Resets this iterator.

public

return(value: Object): IteratorResult

Called when this iterator will no longer be run to completion.

Public Constructors

public constructor(edgeData: EdgeData, cellPosition: Vector3, cellSize: Number, c: Number, d: Number) source

Constructs a new edge iterator.

Params:

NameTypeAttributeDescription
edgeData EdgeData

A set of edge data.

cellPosition Vector3

The position of the data cell.

cellSize Number

The size of the data cell.

c Number
  • optional
  • default: 0

The dimension index to start at.

d Number
  • optional
  • default: 3

The dimension limit.

Public Members

public lengths: Number[] source

The amount of edges for each internal set of edges (X -> Y -> Z).

Public Methods

public [Symbol.iterator](): EdteIterator source

Returns this iterator.

Return:

EdteIterator

An iterator.

public next(): IteratorResult source

Iterates over the edges.

Return:

IteratorResult

The next edge.

public reset(): EdgeIterator source

Resets this iterator.

Return:

EdgeIterator

This iterator.

public return(value: Object): IteratorResult source

Called when this iterator will no longer be run to completion.

Params:

NameTypeAttributeDescription
value Object

An interator result value.

Return:

IteratorResult

A premature completion result.