Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > 6ba95eb068aab5480bfe9a9a0d0fa03c > files > 203

blitz-devel-0.9-13.fc13.x86_64.rpm

/*****************************************************************************
 * simple.cpp        Some simple array operations
 *****************************************************************************/

#include <blitz/array.h>

BZ_USING_NAMESPACE(blitz)

int main()
{
    Array<double,1> x(100);
    x = tensor::i;          // x = [ 0, 1, 2, ..., 99 ]

    Array<double,1> z(x + 150);
    Array<double,1> v(z + x * 2);

    cout << v << endl;
}