NAME
subtract_scalar_from_vector - Subtracs a scalar from a vector
SYNOPSIS
#include "m/m_vec_arith.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
int subtract_scalar_from_vector
(
Vector **target_vpp,
const Vector *source_vp,
double scalar
);
DESCRIPTION
This routine subtracts the the scalar in "scalar" from the vector in
"source_vp", and puts the result in the vector pointed to by "target_vpp".
That vector is created or resized as necessary.
If we are respecting missing values, then the sqrt() of a missing value
(DBL_MISSING) is DBL_MISSING.
More specifically, the first argument is the adress of the target vector. If
the target vector itself is null, then a vector of the appropriate size is
created. If the target vector is the wrong size, it is resized. Finally, if
it is the right size, then the storage is recycled, as is.
RETURNS
NO_ERROR on success, and ERROR on failure with the error message being
set. Currently, failure can only be due to storage allocation error.
RELATED
ow_subtract_scalar_from_vector
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kobus Barnard
DOCUMENTER
Kobus Barnard
SEE ALSO
multiply_vector_by_scalar
,
ow_multiply_vector_by_scalar
,
divide_vector_by_scalar
,
ow_divide_vector_by_scalar
,
add_scalar_to_vector
,
ow_add_scalar_to_vector
,
ow_subtract_scalar_from_vector
,
add_vectors
,
subtract_vectors
,
multiply_vectors
,
divide_vectors
,
ow_add_scalar_times_vector_to_vector
,
ow_add_vectors
,
ow_add_vector_times_scalar
,
ow_subtract_vectors
,
ow_subtract_vector_times_scalar
,
ow_multiply_vectors
,
ow_divide_vectors
,
invert_vector
,
ow_invert_vector
,
sqrt_vector
,
ow_sqrt_vector
,
log_vector
,
log_vector_2
,
ow_log_vector
,
ow_log_vector_2
,
exp_vector
,
ow_exp_vector
,
get_abs_of_vector
,
ow_get_abs_of_vector
,
average_vector_elements
,
average_vector_squared_elements
,
sum_vector_elements
,
sum_vector_squared_elements
,
multiply_vector_elements