MCPcopy Create free account
hub / github.com/bgrimstad/splinter / get_densevector

Function get_densevector

include/cinterface/utilities.h:59–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57 */
58template <class NUMERICAL_TYPE>
59DenseVector get_densevector(NUMERICAL_TYPE *x, size_t x_dim)
60{
61 DenseVector xvec(x_dim);
62 for (size_t i = 0; i < x_dim; i++)
63 {
64 xvec(i) = (double) x[i];
65 }
66
67 return xvec;
68}
69
70/**
71 * Convert from DenseVector to a vector of NUMERICAL_TYPE.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected