| Rosetta 3.2.1 Release Manual |
void
f()
{
using numeric::xyzVector_double;
xyzVector_double r; // Default constructed (uninitialized)
xyzVector_double s( 0.0 ); // Constructs s = ( 0.0, 0.0, 0.0 )
xyzVector_double t( 1.0, 2.0, 3.0 ); // Constructs t = ( 1.0, 2.0, 3.0 )
...
t.x() = 1.5; // Elements can be accessed as x(), y(), and z()
}
xyzVector_double const pos_ij( &position(1,i,j) ); // position(1-3,i,j)
You can use numeric::xyzVector in loops by accessing the elements by index:
v( i ); // For i = 1, 2, 3 (1-based indexing for xyzVector )
v[ i ]; // For i = 0, 1, 2 (0-based indexing for xyzVector )
1.5.9