This is the latest (main) BeagleBoard documentation. If you are looking for stable releases, use the drop-down menu on the bottom-left and select the desired version.

Function rc_vector_times_scalar

Function Documentation

int rc_vector_times_scalar(rc_vector_t *v, double s)

Multiplies every entry in vector v by scalar s.

It is not strictly necessary for v to be provided as a pointer since a copy of the struct v would also contain the correct pointer to the original vector’s allocated memory. However, in this library we use the convention of passing an rc_vector_t struct or rc_matrix_struct as a pointer when its data is to be modified by the function, and as a normal argument when it is only to be read by the function.

  • v – Pointer to user’s rc_vector_t struct

  • s[in] scalar multiplier


Returns 0 on success or -1 on failure.