Mir 1.0
Mir application programming interface
Norms of vectors and matrices

Macros

#define mirml_mh_v_norm1(x, n)   mirml_mh_v_norm1_s(x,NULL,n)
 Computes uscaled 1-norms of vectors.
 
#define mirml_mh_v_norm2(x, n)   mirml_mh_v_norm2_s(x,NULL,n)
 Computes uscaled 2-norm (Euclidean norm) of vectors.
 
#define mirml_mh_v_norminf(x, n)   mirml_mh_v_norminf_s(x,NULL,n)
 Computes uscaled infinity-norm (supremum norm) of vectors.
 

Functions

mirkl_error_tmirml_mh_v_norm1_s (const mirml_mh_vector_t *x, const mirml_mh_vector_t *scale, double *norm)
 Computes (scaled) 1-norms of vectors. More...
 
mirkl_error_tmirml_mh_v_norm2_s (const mirml_mh_vector_t *x, const mirml_mh_vector_t *scale, double *norm)
 Computes (scaled) 2-norm (Euclidean norm) of vectors. More...
 
mirkl_error_tmirml_mh_v_norminf_s (const mirml_mh_vector_t *x, const mirml_mh_vector_t *scale, double *norm)
 Computes (scaled) infinity-norm (supremum norm) of vectors. More...
 
mirkl_error_tmirml_mh_m_norm1 (const mirml_mh_matrix_t *A, double *norm)
 Compute matrix unscaled 1-norm. More...
 
mirkl_error_tmirml_mh_m_norm_inf (const mirml_mh_matrix_t *A, double *norm)
 Compute matrix unscaled infinity-norm. More...
 
mirkl_error_tmirml_mh_m_norm_frob (const mirml_mh_matrix_t *A, double *norm)
 Compute matrix unscaled frobenius-norm. More...
 

Detailed Description

Function Documentation

◆ mirml_mh_m_norm1()

mirkl_error_t * mirml_mh_m_norm1 ( const mirml_mh_matrix_t A,
double *  norm 
)

Compute matrix unscaled 1-norm.

Parameters
[in]AInput matrix.
[out]normNorm of input matrix on output.

◆ mirml_mh_m_norm_frob()

mirkl_error_t * mirml_mh_m_norm_frob ( const mirml_mh_matrix_t A,
double *  norm 
)

Compute matrix unscaled frobenius-norm.

Parameters
[in]AInput matrix.
[out]normNorm of input matrix on output.

◆ mirml_mh_m_norm_inf()

mirkl_error_t * mirml_mh_m_norm_inf ( const mirml_mh_matrix_t A,
double *  norm 
)

Compute matrix unscaled infinity-norm.

Parameters
[in]AInput matrix.
[out]normNorm of input matrix on output.

◆ mirml_mh_v_norm1_s()

mirkl_error_t * mirml_mh_v_norm1_s ( const mirml_mh_vector_t x,
const mirml_mh_vector_t scale,
double *  norm 
)

Computes (scaled) 1-norms of vectors.

Parameters
[in]xInput vector.
[in]scaleOptional scaling vector. If NULL – no scaling required.
[out]normNorm of input vector on output.
Note
scale is used to divide components of input vector: x_i/s_i

◆ mirml_mh_v_norm2_s()

mirkl_error_t * mirml_mh_v_norm2_s ( const mirml_mh_vector_t x,
const mirml_mh_vector_t scale,
double *  norm 
)

Computes (scaled) 2-norm (Euclidean norm) of vectors.

Parameters
[in]xInput vector.
[in]scaleOptional scaling vector. If NULL – no scaling required.
[out]normNorm of input vector on output.
Note
scale is used to divide components of input vector: x_i/s_i

◆ mirml_mh_v_norminf_s()

mirkl_error_t * mirml_mh_v_norminf_s ( const mirml_mh_vector_t x,
const mirml_mh_vector_t scale,
double *  norm 
)

Computes (scaled) infinity-norm (supremum norm) of vectors.

Parameters
[in]xInput vector.
[in]scaleOptional scaling vector. If NULL – no scaling required.
[out]normNorm of input vector on output.
Note
scale is used to divide components of input vector: x_i/s_i