C++
C#
VB
JScript
All

# dense_vector_generate

Copyright (C) 2005 IENT-RWTH Aachen

template<class F> inline typename DenseVector<typename F::result_type>::self dense_vector_generate(int n, const F &f)
template<class Arg,class Res> inline typename DenseVector<Res >::self dense_vector_generate(int n, Res (*f)(Arg))

Creates an dense vector and initalizes it with a function

Parameters

n | size of the dense vector
f | the function to call

Remarks

The function f is called for each position of X

    X[i] = f(i);

See Also

generate, dense_matrix_generate, DenseVector