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

}<br />

public static Index4 operator – (Index4 p1);<br />

public static Index4 operator – (Index4 p1, Index4 p2);<br />

public static Index4 operator – (Index4 p1, int val);<br />

public static Index4 operator – (int val, Index4 p1);<br />

public static Index4 operator != (Index4 p1, Index4 p2);<br />

public static Index4 operator * (Index4 p1, Index4 p2);<br />

public static Index4 operator * (Index4 p1, int val);<br />

public static Index4 operator * (int val, Index4 p1);<br />

public static Index4 operator / (Index4 p1, Index4 p2);<br />

public static Index4 operator / (Index4 p1, int val);<br />

public static Index4 operator / (int val, Index4 p1);<br />

public static Index4 operator + (Index4 p1, Index4 p2);<br />

public static Index4 operator + (Index4 p1, int val);<br />

public static Index4 operator + (int val, Index4 p1);<br />

public static Index4 operator == (Index4 p1, Index4 p2);<br />

public static explicit operator Index4 (Index2 arg);<br />

public static explicit operator Index4 (Index3 arg);<br />

public static explicit operator Index4 (int[ ] arg);<br />

public static implicit [ ] operator int (Index4 arg);<br />

Index types have the following properties:<br />

• I – the first Index vector<br />

• J – the second Index vector<br />

• K – the third Index vector for Index3 and Index4 types<br />

• L – the fourth Index vector for Index4 objects<br />

Each Index type has multiple constructors, but all have the same pattern. For example, the<br />

constructors for Index3 are:<br />

// Default constructor<br />

Index3 idx_1 = new Index3();<br />

// Copy constructor<br />

Index3 idx_2 = new Index3(idx_1);<br />

// Construct from I, J, K values<br />

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

// I = 3, J = 5, K = 7<br />

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

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

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

Saved successfully!

Ooh no, something went wrong!