02.05.2014 Views

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Basics<br />

EquivalenceTransform – This method creates a new extent that has the same<br />

relationship to me as a given subExtent has to a given masterExtent. If a relationship<br />

cannot be derived, then an empty extent is created.<br />

Extent2 extVal = new Extent2(new Index2 (1, 2), new Index2(1, 2));<br />

// extVal is [1 : 1 : 1, 2 : 1 : 3]<br />

Extent2 extMaster = new Extent2(new Index2 (1, 2), new Index2(1, 2));<br />

// extMaster is [1 : 1 : 1, 2 : 1 : 3]<br />

Extent2 extSub = new Extent2(new Index2 (1, 2), new Index2(1, 3));<br />

// extSub is [1 : 1 : 1, 2 : 1 : 4]<br />

Extent2 newExt = extVal.EquivalenceTransform(extMaster, extSub);<br />

// result for newExt is [1 : 1 : 1, (empty)]<br />

IndexExtent – This method creates a new extent from the current extent that<br />

represents an index. The index extent will have starting values at 0, increment by 1, and<br />

contain the number of values in the original extent. There are two overloaded methods for<br />

IndexExtent.<br />

Method 1:<br />

public Extent2 IndexExtent();<br />

Create an index extent from an Extent2 object that begins at 0, increments by 1, and<br />

has the same count.<br />

Extent2 extVal = new Extent2(new Index2 (1, 2), new Index2(1, 3));<br />

//result is [1 : 1 : 1, 2 : 1 : 3]<br />

Method 2:<br />

Extent2 newExt = extVal.IndexExtent();<br />

//result is [0 : 1 : 0, 0 : 1 : 2]<br />

public Extent2 IndexExtent(Extent2 other);<br />

4-122 <strong>Ocean</strong> Application Development Framework 2008.1<br />

<strong>Schlumberger</strong> Private

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!