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 />

Min – This method returns an Index made of the minimum value of each property.<br />

IndexDouble3 idx_1 = new IndexDouble3(3.0, 10.0, 7.0);<br />

IndexDouble3 idx_2 = new IndexDouble3(1.0, 15.0, 6.0);<br />

IndexDouble3 idx_min = IndexDouble3.Min(idx_1, idx_2);<br />

// idx_min value is (1.0, 10.0, 6.0)<br />

One - This method returns an Index with all properties set to 1.<br />

IndexDouble3 idx_1 = IndexDouble3.One();<br />

// idx_1 value is (1.0, 1.0, 1.0)<br />

Product – This method returns a double that is the product of the Index properties.<br />

IndexDouble3 idx_1 = new IndexDouble3(3.0, 10.0, 7.0);<br />

double product = IndexDouble3.Product(idex_1);<br />

// product = 3 * 10 * 7 = 210.00<br />

Sum – This method returns a double that is the sum of the Index properties.<br />

IndexDouble3 idx_1 = new IndexDouble3(3.0, 10.0, 7.0);<br />

double sum = IndexDouble3.Sum(idx_1);<br />

// sum = 3 + 10 + 7 = 20.0<br />

ToString – This method returns a string representation of the Index.<br />

IndexDouble3 idx_1 = new IndexDouble3 (3.0, 10.0, 7.0);<br />

string str = idx_1.ToString();<br />

// str is sum = 3.0:10.0:7.0<br />

Zero – This method returns an Index with all properties set to 0.<br />

IndexDouble3 idx_1 = IndexDouble3.Zero();<br />

// idx_1 value is (0.0, 0.0, 0.0)<br />

IndexRange Classes<br />

The Slb.<strong>Ocean</strong>.Basics namespace defines four classes called IndexRange1,<br />

IndexRange2, IndexRange3, and IndexRange4. These classes represent integer<br />

ranges with one, two, three, or four dimensions respectively. The range for each<br />

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