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

IsAllNonZero – This method returns true if all of the properties are not equal to 0.<br />

Index3 idx3 = new Index3(0, 0, 0);<br />

bool af = idx3.IsAllNonZero();<br />

// result for af is false<br />

Index3 idx3 = new Index3(-3, -5, 7);<br />

bool af = idx3.IsAllNonZero();<br />

// result for af is true<br />

IsAllZero – This method returns true if all property values are equal to 0.<br />

Index3 idx3 = new Index3(3, 0, 0);<br />

bool af = idx3.IsAllZero();<br />

// result for af is false<br />

Index3 idx3 = new Index3(0, 0, 0);<br />

bool af = idx3.IsAllZero();<br />

// result for af is true<br />

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

Index3 idx_1 = new Index3(3, 10, 7);<br />

Index3 idx_2 = new Index3(1, 15, 6);<br />

Index3 idx_max = Index3.Max(idx_1, idx_2);<br />

// idx_max value is (3, 15, 7)<br />

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

Index3 idx_1 = new Index3(3, 10, 7);<br />

Index3 idx_2 = new Index3(1, 15, 6);<br />

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

// idx_max value is (1, 10, 6)<br />

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

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

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

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