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.

outside the range of the second Extent in the Extent2. The valid index range for this<br />

Extent is 0 through 9.<br />

Basics<br />

bool result = extVal.ContainsIndex(new Index2 (0, 1));<br />

//result is true<br />

result = extVal.ContainsIndex(new Index2 (1, 12));<br />

//result is false<br />

CopyIncreasing – This method copies this Extent2 and reverses the values if needed<br />

to ensure a positive increment.<br />

Index2 begin = new Index2(0, 1);<br />

Index2 size = new Index2(5, 5);<br />

Index2 inc = new Index2(-1, 1);<br />

Extent2 ext = new Extent2(begin, size, inc);<br />

//result Extent2 is [0:-1:-4, 1:1:5]<br />

Extent2 newExt = ext.CopyIncreasing();<br />

//newExt = [-4:1:0, 1:1:5]<br />

CreateIncreasing - This method creates an extent that has a positive increment value.<br />

The input values will be reverted to ensure that the new extent has a positive increment.<br />

Index2 begin = new Index2(0, 1);<br />

Index2 end = new Index2(5, 5);<br />

Index2 inc = new Index2(-1, 1);<br />

Extent2 ext = Extent2.CreateIncreasing(begin, end, inc);<br />

//ext = [-4 : 1 : 0, 1 : 1 : 5]<br />

<strong>Schlumberger</strong> Private<br />

<strong>Ocean</strong> Services 4-121

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

Saved successfully!

Ooh no, something went wrong!