02.05.2014 Views

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

CoreandServices.book - Ocean - Schlumberger

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Basics<br />

IsSubset – This method returns true if the input Extent2 is a subset of this<br />

Extent2.<br />

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

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

Extent2 ext1 = new Extent2(new Index2 (1, 1), new Index2(3, 4));<br />

//ext1 is [1 : 1 : 3, 1 : 1 : 4]<br />

bool result = ext1.IsSubset(ext);<br />

//result is true<br />

result = ext.IsSubset(ext1);<br />

//result is false<br />

Intersection – This method gets the intersection of the given two extent objects.<br />

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

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

Extent2 ext1 = new Extent2(new Index2 (1, 1), new Index2(3, 4));<br />

//ext1 is [1 : 1 : 3, 1 : 1 : 4]<br />

Extent2 ext2 = ext1.Intersection(ext);<br />

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

Reverse – This method returns the reverse of the extent.<br />

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

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

Extent2 reverseExt = ext.Reverse();<br />

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

NearestIndex – This method finds the nearest index in the extent corresponding to<br />

given values in the Index2 input parameter. If the input values are off the end of the<br />

4-124 <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!