Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## sim.field.grid
Class DoubleGrid3D

    java.lang.Object
      sim.field.grid.AbstractGrid3D
          sim.field.grid.DoubleGrid3D

All Implemented Interfaces:
  Grid3D, java.io.Serializable

public class DoubleGrid3D
extends AbstractGrid3D

A wrapper for 3D arrays of doubles.

This object expects that the 3D arrays are rectangular. You are encouraged to access the array directly. The object implements all of the Grid3D interface. See Grid3D for rules on how to properly implement toroidal grids.

The width and height and length (z dimension) of the object are provided to avoid having to say field[x].length, etc.

See Also:
  Serialized Form

Field Summary
`double[][][]` | `field`

Fields inherited from class sim.field.grid.AbstractGrid3D
`height, length, width`

Constructor Summary
`DoubleGrid3D(DoubleGrid3D values)`
`DoubleGrid3D(int xdim, int ydim, int zdim)`
`DoubleGrid3D(int xdim, int ydim, int zdim, double initialValue)`

Method Summary
`DoubleGrid3D` | `add(double withThisMuch)`
`DoubleGrid3D` | `add(DoubleGrid3D withThis)`
`DoubleGrid3D` | `add(IntGrid3D withThis)`
`DoubleGrid3D` | `ceiling()`
`DoubleGrid3D` | `floor()`
`double` | `get(int x, int y, int z)`
`void` | `getNeighborsHamiltonianDistance(int x, int y, int z, int dist, boolean toroidal, DoubleBag result, IntBag xPos, IntBag yPos, IntBag zPos)`
`void` | `getNeighborsMaxDistance(int x, int y, int z, int dist, boolean toroidal, DoubleBag result, IntBag xPos, IntBag yPos, IntBag zPos)`
`DoubleGrid3D` | `lowerBound(double toNoLowerThanThisMuch)`
`double` | `max()`
`double` | `mean()`
`double` | `min()`
`DoubleGrid3D` | `multiply(double byThisMuch)`
`DoubleGrid3D` | `multiply(DoubleGrid3D withThis)`
`DoubleGrid3D` | `multiply(IntGrid3D withThis)`
`DoubleGrid3D` | `rint()`
`double` | `set(int x, int y, int z, double val)`
`DoubleGrid3D` | `setTo(double thisMuch)`
`DoubleGrid3D` | `setTo(DoubleGrid3D values)`
`DoubleGrid3D` | `truncate()` round towards zero
`DoubleGrid3D` | `upperBound(double toNoMoreThanThisMuch)`

Methods inherited from class sim.field.grid.AbstractGrid3D
`getHeight, getLength, getNeighborsHamiltonianDistance, getNeighborsMaxDistance, getWidth, stx, sty, stz, tx, ty, tz`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### field

    public double[][][] field

Constructor Detail

### DoubleGrid3D

    public DoubleGrid3D(int xdim,
                        int ydim,
                        int zdim)

### DoubleGrid3D

    public DoubleGrid3D(int xdim,
                        int ydim,
                        int zdim,
                        double initialValue)

### DoubleGrid3D

    public DoubleGrid3D(DoubleGrid3D values)

Method Detail

### set

    public final double set(int x,
                            int y,
                            int z,
                            double val)

### get

    public final double get(int x,
                            int y,
                            int z)

### max

    public final double max()

### min

    public final double min()

### mean

    public final double mean()

### setTo

    public final DoubleGrid3D setTo(double thisMuch)

### setTo

    public final DoubleGrid3D setTo(DoubleGrid3D values)

### upperBound

    public final DoubleGrid3D upperBound(double toNoMoreThanThisMuch)

### lowerBound

    public final DoubleGrid3D lowerBound(double toNoLowerThanThisMuch)

### add

    public final DoubleGrid3D add(double withThisMuch)

### add

    public final DoubleGrid3D add(IntGrid3D withThis)

### add

    public final DoubleGrid3D add(DoubleGrid3D withThis)

### multiply

    public final DoubleGrid3D multiply(double byThisMuch)

### multiply

    public final DoubleGrid3D multiply(IntGrid3D withThis)

### multiply

    public final DoubleGrid3D multiply(DoubleGrid3D withThis)

### floor

    public final DoubleGrid3D floor()

### ceiling

    public final DoubleGrid3D ceiling()

### truncate

    public final DoubleGrid3D truncate()

  round towards zero

### rint

    public final DoubleGrid3D rint()

### getNeighborsMaxDistance

    public final void getNeighborsMaxDistance(int x,
                                              int y,
                                              int z,
                                              int dist,
                                              boolean toroidal,
                                              DoubleBag result,
                                              IntBag xPos,
                                              IntBag yPos,
                                              IntBag zPos)

### getNeighborsHamiltonianDistance

    public final void getNeighborsHamiltonianDistance(int x,
                                                      int y,
                                                      int z,
                                                      int dist,
                                                      boolean toroidal,
                                                      DoubleBag result,
                                                      IntBag xPos,
                                                      IntBag yPos,
                                                      IntBag zPos)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD