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

- (subtraction)<br />

IndexDouble3 idx_sub_idx = idx_double_1 - idx_double_2;<br />

// Value for idx_sub_idx is (-6.0, -8.0, -10.0) from 3-9, 5-13, 7-17<br />

IndexDouble3 idx_sub_double = idx_double_1 – 5;<br />

// Value for idx_sub_dobule is (-2.0, 0.0, 2.0) from 3-5, 5-5, 7-5<br />

IndexDouble3 double_sub_idx = 5 – idx_double_1;<br />

// Value for double_sub_idx is (2.0, 0.0, -2.0) from 5-3, 5-5, 5-7<br />

IndexDouble3 sub_idx = -idx_double_1;<br />

// Value for sub_idx is (-3.0, -5.0, -7.0) from -1*3, -1*5, -1*7<br />

* (multiplication)<br />

IndexDouble3 idx_mult_idx = idx_double_1 * idx_double_2;<br />

// Value for idx_mult_idx is (27.0, 65.0, 119.0) from 3*9, 5*13, 7*17<br />

IndexDouble3 idx_mult_double = idx_double_1 * 5;<br />

// Value for idx_mult_double is (15.0, 25.0, 35.0) from 3*5, 5*5, 7*5<br />

/ (division)<br />

IndexDouble3 double_mult_idx = 5 * idx_double_1;<br />

// Value for double_mult_idx is (15.0, 25.0, 35.0) from 5*3, 5*5, 5*7<br />

IndexDouble3 idx_div_idx = idx_double_1 / idx_double_2;<br />

// Value for idx_div_idx is (0.3333, 0.3846, 0.4117) from 3/9, 5/13, 7/<br />

17<br />

IndexDouble3 idx_div_double = idx_double_1 / 5;<br />

// Value for idx_div_double is (0.6, 1.0, 1.4) from 3/5, 5/5, 7/5<br />

IndexDouble3 double_div_idx = 5 / idx_double_1;<br />

// Value for double_div_idx is (1.6666, 1.0, 0.7142) from 5/3, 5/5, 5/7<br />

!= (not equal to)<br />

if (idx_double_1 != idx_double_2)<br />

// test is true<br />

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