GridWeight
Date: 2013-06-05

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

## gov.sandia.gnem.slbmjni
Class GridWeight

    java.lang.Object
      gov.sandia.gnem.slbmjni.GridWeight

    public class GridWeight

extends java.lang.Object

Stores the weight assigned to each grid node that was touched by the GreatCircle that was in memory the last time `SlbmInterface.getWeights()` was called.

When `SlbmInterface.getWeights()` is called, a map which associates an instance of a GreatCircle object with a double weight is initialized. Then every LayerProfile on the head wave interface between the source and receiver is visited and the angular distance, d, that the ray traveled in the horizontal segment is retreived. If d > 0, then the neighboring GridProfile objects that contributed to the interpolated value of the LayerProfile are visited. The product of d * R * C is added to the weight associated with that GridProfile object, where R is the radius of the head wave interface for the LayerProfile object being evaluated, and C is the interpolation coefficient for the GridProfile - LayerProfile pair under consideration. Then, all the GridProfile objects in the map are visited, the grid node IDs extracted into int array node, and the weight extracted into double array weight.

Note: Only grid nodes touched by the GreatCircle currently in memory are included in the output. Each grid node is included only once, even though more than one LayerProfile object may have contributed some weight to it. The sum of all the weights will equal the horizontal distance traveled by the ray along the head wave interface, from the source pierce point to the receiver pierce point, in km.

Field Summary
`int[]` | `node` The IDs of the grid nodes that were 'touched' by the current GreatCircle.
`double[]` | `weight` The weight accumulated by each node.

Constructor Summary
`GridWeight()`

Method Summary
`double` | `getSum()` Retrieve the sum of the weights.
`java.lang.String` | `toString()` Retrieve a formatted String representation of the information in this GridProfile object.

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

Field Detail

### node

    public int[] node

  The IDs of the grid nodes that were 'touched' by the current GreatCircle.

### weight

    public double[] weight

  The weight accumulated by each node.

Constructor Detail

### GridWeight

    public GridWeight()

Method Detail

### getSum

    public double getSum()

  Retrieve the sum of the weights. This should be equal to getHeadwaveDistanceKm();

  Returns:
    the sum of the weights

### toString

    public java.lang.String toString()

  Retrieve a formatted String representation of the information in this GridProfile object.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    String a formatted String representation of the information in this GridProfile object.

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