acompscalarproduct       package:compositions       R Documentation

_i_n_n_e_r _p_r_o_d_u_c_t _f_o_r _d_a_t_a_s_e_t_s _w_i_t_h _a _v_e_c_t_o_r _s_p_a_c_e _s_t_r_u_c_t_u_r_e

_D_e_s_c_r_i_p_t_i_o_n:

     acomp and aplus objects are considered as (sets of) vectors. The
     '%*%' is considered as the inner multiplication. An inner
     multiplication with another vector is the scalar product. An inner
     multiplication with a matrix is a matrix multiplication, where the
     vectors are either considered as row or as column vector.

_A_r_g_u_m_e_n_t_s:

     'x %*% y'
      '  x %*% A'
      '  A %*% x'
      '  x %*% y'
      '  x %*% A'
      '  A %*% x'


       x: a acomp or aplus object 

       y: a acomp or aplus object

       A: a matrix interpreted in clr, ilr or ilt coordinates

_D_e_t_a_i_l_s:

     The operators try to mimic the behavior of '%*%' on 'c()'-vectors
     as inner product, applied in parallel to all row-vectors of the
     dataset. Thus the product of a vector with a vector of the same
     type results in the scalar product of both. For the multiplication
     with a matrix each vector is considered as a row or column,
     whatever is more appropriate. The matrix itself is considered as
     representing a linear mapping (endomorphism) of the vector space
     to a space of the same type. The mapping is represented in clr,
     ilr or ilt coordinates. Which of the aforementioned coordinate
     systems is used is judged from the type of x and from the
     dimensions of the A.

_V_a_l_u_e:

     Either a numeric vector containing the scalar products, or an
     object of type acomp or aplus containing the vectors transformed
     with the given matrix.

_S_e_e _A_l_s_o:

     '%*%.rmult'

_E_x_a_m_p_l_e_s:

     x <- acomp(matrix( sqrt(1:12), ncol= 3 ))
     x%*%x
     A <- matrix( 1:9,nrow=3)
     x %*% A %*% x
     x %*% A
     A %*% x
     A <- matrix( 1:4,nrow=2)
     x %*% A %*% x
     x %*% A
     A %*% x
     x <- aplus(matrix( sqrt(1:12), ncol= 3 ))
     x%*%x
     A <- matrix( 1:9,nrow=3)
     x %*% A %*% x
     x %*% A
     A %*% x

