00001 // Copyright (C) 2009 NICTA 00002 // 00003 // Authors: 00004 // - Conrad Sanderson (conradsand at ieee dot org) 00005 // 00006 // This file is part of the Armadillo C++ library. 00007 // It is provided without any warranty of fitness 00008 // for any purpose. You can redistribute this file 00009 // and/or modify it under the terms of the GNU 00010 // Lesser General Public License (LGPL) as published 00011 // by the Free Software Foundation, either version 3 00012 // of the License or (at your option) any later version. 00013 // (see http://www.opensource.org/licenses for more info) 00014 00015 00016 00017 00018 //! \addtogroup operator_times 00019 //! @{ 00020 00021 // "rowvec * colvec" and other combinations which result 00022 // in a scalar are declared in "operator_times_dot.hpp" 00023 00024 // 00025 // new operators 00026 00027 //! Base * scalar 00028 template<typename T1> 00029 arma_inline 00030 const Op<T1, op_scalar_times> 00031 operator* 00032 (const Base<typename T1::elem_type,T1>& X, const typename T1::elem_type k) 00033 { 00034 arma_extra_debug_sigprint(); 00035 00036 return Op<T1, op_scalar_times>(X.get_ref(),k); 00037 } 00038 00039 00040 00041 //! op * scalar, level 2 00042 template<typename T1> 00043 arma_inline 00044 const Op<T1,op_scalar_times> 00045 operator* 00046 (const Op<T1,op_scalar_times>& X, const typename T1::elem_type k) 00047 { 00048 arma_extra_debug_sigprint(); 00049 00050 return Op<T1, op_scalar_times>(X.m, X.aux * k); 00051 } 00052 00053 00054 00055 //! Op<mat,op_ones_full> * scalar 00056 template<typename eT> 00057 arma_inline 00058 Mat<eT> 00059 operator* 00060 (const Op<Mat<eT>,op_ones_full>& X, const eT k) 00061 { 00062 arma_extra_debug_sigprint(); 00063 00064 Mat<eT> tmp(X.aux_u32_a, X.aux_u32_b); 00065 tmp.fill(k); 00066 00067 return tmp; 00068 } 00069 00070 00071 00072 //! Op<mat,op_ones_diag> * scalar 00073 template<typename eT> 00074 arma_inline 00075 Mat<eT> 00076 operator* 00077 (const Op<Mat<eT>,op_ones_diag>& X, const eT k) 00078 { 00079 arma_extra_debug_sigprint(); 00080 00081 Mat<eT> out; 00082 out.zeros(X.aux_u32_a, X.aux_u32_b); 00083 00084 for(u32 i=0; i<out.n_rows; ++i) 00085 { 00086 out.at(i,i) = k; 00087 } 00088 00089 return out; 00090 } 00091 00092 00093 00094 //! scalar * Base 00095 template<typename T1> 00096 arma_inline 00097 const Op<T1, op_scalar_times> 00098 operator* 00099 (const typename T1::elem_type k, const Base<typename T1::elem_type,T1>& X) 00100 { 00101 arma_extra_debug_sigprint(); 00102 00103 return Op<T1, op_scalar_times>(X.get_ref(),k); // NOTE: order is swapped 00104 } 00105 00106 00107 00108 //! scalar * Op<mat,op_ones_full> 00109 template<typename eT> 00110 arma_inline 00111 Mat<eT> 00112 operator* 00113 (const eT k, const Op<Mat<eT>,op_ones_full>& X) 00114 { 00115 arma_extra_debug_sigprint(); 00116 00117 Mat<eT> tmp(X.aux_u32_a, X.aux_u32_b); 00118 tmp.fill(k); 00119 00120 return tmp; 00121 } 00122 00123 00124 00125 //! scalar * Op<mat,op_ones_diag> 00126 template<typename eT> 00127 arma_inline 00128 Mat<eT> 00129 operator* 00130 (const eT k, const Op<Mat<eT>,op_ones_diag>& X) 00131 { 00132 arma_extra_debug_sigprint(); 00133 00134 Mat<eT> out; 00135 out.zeros(X.aux_u32_a, X.aux_u32_b); 00136 00137 for(u32 i=0; i<out.n_rows; ++i) 00138 out.at(i,i) = k; 00139 00140 return out; 00141 } 00142 00143 00144 00145 //! Base * diagmat 00146 template<typename T1, typename T2> 00147 arma_inline 00148 const Glue<T1, Op<T2,op_diagmat>, glue_times_diag> 00149 operator* 00150 (const Base<typename T2::elem_type, T1>& X, const Op<T2,op_diagmat>& Y) 00151 { 00152 arma_extra_debug_sigprint(); 00153 00154 return Glue<T1, Op<T2,op_diagmat>, glue_times_diag>(X.get_ref(), Y); 00155 } 00156 00157 00158 00159 //! diagmat * Base 00160 template<typename T1, typename T2> 00161 arma_inline 00162 const Glue<Op<T1,op_diagmat>, T2, glue_times_diag> 00163 operator* 00164 (const Op<T1,op_diagmat>& X, const Base<typename T1::elem_type, T2>& Y) 00165 { 00166 arma_extra_debug_sigprint(); 00167 00168 return Glue<Op<T1,op_diagmat>, T2, glue_times_diag>(X, Y.get_ref()); 00169 } 00170 00171 00172 00173 //! colvec * rowvec 00174 template<typename eT> 00175 arma_inline 00176 const Glue<Col<eT>, Row<eT>, glue_times_vec> 00177 operator* 00178 (const Col<eT>& X, const Row<eT>& Y) 00179 { 00180 arma_extra_debug_sigprint(); 00181 00182 return Glue<Col<eT>, Row<eT>, glue_times_vec>(X, Y); 00183 } 00184 00185 00186 00187 //! Base * colvec 00188 template<typename T1> 00189 arma_inline 00190 const Glue<T1, Col<typename T1::elem_type>, glue_times_vec> 00191 operator* 00192 (const Base<typename T1::elem_type,T1>& X, const Col<typename T1::elem_type>& Y) 00193 { 00194 arma_extra_debug_sigprint(); 00195 00196 return Glue<T1, Col<typename T1::elem_type>, glue_times_vec>(X.get_ref(), Y); 00197 } 00198 00199 00200 00201 //! Base * rowvec 00202 template<typename T1> 00203 arma_inline 00204 const Glue<T1, Row<typename T1::elem_type>, glue_times_vec> 00205 operator* 00206 (const Base<typename T1::elem_type,T1>& X, const Row<typename T1::elem_type>& Y) 00207 { 00208 arma_extra_debug_sigprint(); 00209 00210 return Glue<T1, Row<typename T1::elem_type>, glue_times_vec>(X.get_ref(), Y); 00211 } 00212 00213 00214 00215 //! colvec * Base 00216 template<typename T1> 00217 arma_inline 00218 const Glue<Col<typename T1::elem_type>, T1, glue_times_vec> 00219 operator* 00220 (const Col<typename T1::elem_type>& X, const Base<typename T1::elem_type,T1>& Y) 00221 { 00222 arma_extra_debug_sigprint(); 00223 00224 return Glue<Col<typename T1::elem_type>, T1, glue_times_vec>(X, Y.get_ref()); 00225 } 00226 00227 00228 00229 //! rowvec * Base 00230 template<typename T1> 00231 arma_inline 00232 const Glue<Row<typename T1::elem_type>, T1, glue_times_vec> 00233 operator* 00234 (const Row<typename T1::elem_type>& X, const Base<typename T1::elem_type,T1>& Y) 00235 { 00236 arma_extra_debug_sigprint(); 00237 00238 return Glue<Row<typename T1::elem_type>, T1, glue_times_vec>(X, Y.get_ref()); 00239 } 00240 00241 00242 00243 //! diagmat * colvec 00244 template<typename T1> 00245 arma_inline 00246 const Glue<Op<T1, op_diagmat>, Col<typename T1::elem_type>, glue_times_diag> 00247 operator* 00248 (const Op<T1, op_diagmat>& X, const Col<typename T1::elem_type>& Y) 00249 { 00250 arma_extra_debug_sigprint(); 00251 00252 return Glue<Op<T1, op_diagmat>, Col<typename T1::elem_type>, glue_times_diag>(X, Y); 00253 } 00254 00255 00256 00257 //! diagmat * rowvec 00258 template<typename T1> 00259 arma_inline 00260 const Glue<Op<T1, op_diagmat>, Row<typename T1::elem_type>, glue_times_diag> 00261 operator* 00262 (const Op<T1, op_diagmat>& X, const Row<typename T1::elem_type>& Y) 00263 { 00264 arma_extra_debug_sigprint(); 00265 00266 return Glue<Op<T1, op_diagmat>, Row<typename T1::elem_type>, glue_times_diag>(X, Y); 00267 } 00268 00269 00270 00271 //! colvec * diagmat 00272 template<typename T1> 00273 arma_inline 00274 const Glue<Col<typename T1::elem_type>, Op<T1, op_diagmat>, glue_times_diag> 00275 operator* 00276 (const Col<typename T1::elem_type>& X, const Op<T1, op_diagmat>& Y) 00277 { 00278 arma_extra_debug_sigprint(); 00279 00280 return Glue<Col<typename T1::elem_type>, Op<T1, op_diagmat>, glue_times_diag>(X, Y); 00281 } 00282 00283 00284 00285 //! rowvec * diagmat 00286 template<typename T1> 00287 arma_inline 00288 const Glue<Row<typename T1::elem_type>, Op<T1, op_diagmat>, glue_times_diag> 00289 operator* 00290 (const Row<typename T1::elem_type>& X, const Op<T1, op_diagmat>& Y) 00291 { 00292 arma_extra_debug_sigprint(); 00293 00294 return Glue<Row<typename T1::elem_type>, Op<T1, op_diagmat>, glue_times_diag>(X, Y); 00295 } 00296 00297 00298 00299 // 00300 // multiplication of Base objects with different element types 00301 // 00302 00303 00304 00305 //! Base * Base 00306 template<typename eT1, typename T1, typename eT2, typename T2> 00307 arma_inline 00308 Mat<typename promote_type<eT1,eT2>::result> 00309 operator* 00310 (const Base<eT1,T1>& X, const Base<eT2,T2>& Y) 00311 { 00312 arma_extra_debug_sigprint(); 00313 00314 promote_type<eT1,eT2>::check(); 00315 00316 const unwrap<T1> tmp1(X.get_ref()); 00317 const unwrap<T2> tmp2(Y.get_ref()); 00318 00319 const Mat< eT1 >& A = tmp1.M; 00320 const Mat< eT2 >& B = tmp2.M; 00321 00322 Mat< typename promote_type<eT1,eT2>::result > out; 00323 00324 glue_times::apply_mixed(out, A, B); 00325 00326 return out; 00327 } 00328 00329 00330 00331 // 00332 // multiplication of Base objects with same element types 00333 // 00334 00335 00336 00337 template<typename T1, typename T2> 00338 arma_inline 00339 const Glue<T1, T2, glue_times> 00340 operator* 00341 (const Base<std::complex<double>,T1>& X, const Base<std::complex<double>,T2>& Y) 00342 { 00343 arma_extra_debug_sigprint(); 00344 00345 return Glue<T1, T2, glue_times>(X.get_ref(), Y.get_ref()); 00346 } 00347 00348 00349 00350 template<typename T1, typename T2> 00351 arma_inline 00352 const Glue<T1, T2, glue_times> 00353 operator* 00354 (const Base<std::complex<float>,T1>& X, const Base<std::complex<float>,T2>& Y) 00355 { 00356 arma_extra_debug_sigprint(); 00357 00358 return Glue<T1, T2, glue_times>(X.get_ref(), Y.get_ref()); 00359 } 00360 00361 00362 00363 template<typename T1, typename T2> 00364 arma_inline 00365 const Glue<T1, T2, glue_times> 00366 operator* 00367 (const Base<double,T1>& X, const Base<double,T2>& Y) 00368 { 00369 arma_extra_debug_sigprint(); 00370 00371 return Glue<T1, T2, glue_times>(X.get_ref(), Y.get_ref()); 00372 } 00373 00374 00375 00376 template<typename T1, typename T2> 00377 arma_inline 00378 const Glue<T1, T2, glue_times> 00379 operator* 00380 (const Base<float,T1>& X, const Base<float,T2>& Y) 00381 { 00382 arma_extra_debug_sigprint(); 00383 00384 return Glue<T1, T2, glue_times>(X.get_ref(), Y.get_ref()); 00385 } 00386 00387 00388 00389 template<typename T1, typename T2> 00390 arma_inline 00391 const Glue<T1, T2, glue_times> 00392 operator* 00393 (const Base<s32,T1>& X, const Base<s32,T2>& Y) 00394 { 00395 arma_extra_debug_sigprint(); 00396 00397 return Glue<T1, T2, glue_times>(X.get_ref(), Y.get_ref()); 00398 } 00399 00400 00401 00402 template<typename T1, typename T2> 00403 arma_inline 00404 const Glue<T1, T2, glue_times> 00405 operator* 00406 (const Base<u32,T1>& X, const Base<u32,T2>& Y) 00407 { 00408 arma_extra_debug_sigprint(); 00409 00410 return Glue<T1, T2, glue_times>(X.get_ref(), Y.get_ref()); 00411 } 00412 00413 00414 00415 template<typename T1, typename T2> 00416 arma_inline 00417 const Glue<T1, T2, glue_times> 00418 operator* 00419 (const Base<s16,T1>& X, const Base<s16,T2>& Y) 00420 { 00421 arma_extra_debug_sigprint(); 00422 00423 return Glue<T1, T2, glue_times>(X.get_ref(), Y.get_ref()); 00424 } 00425 00426 00427 00428 template<typename T1, typename T2> 00429 arma_inline 00430 const Glue<T1, T2, glue_times> 00431 operator* 00432 (const Base<u16,T1>& X, const Base<u16,T2>& Y) 00433 { 00434 arma_extra_debug_sigprint(); 00435 00436 return Glue<T1, T2, glue_times>(X.get_ref(), Y.get_ref()); 00437 } 00438 00439 00440 00441 template<typename T1, typename T2> 00442 arma_inline 00443 const Glue<T1, T2, glue_times> 00444 operator* 00445 (const Base<s8,T1>& X, const Base<s8,T2>& Y) 00446 { 00447 arma_extra_debug_sigprint(); 00448 00449 return Glue<T1, T2, glue_times>(X.get_ref(), Y.get_ref()); 00450 } 00451 00452 00453 00454 template<typename T1, typename T2> 00455 arma_inline 00456 const Glue<T1, T2, glue_times> 00457 operator* 00458 (const Base<u8,T1>& X, const Base<u8,T2>& Y) 00459 { 00460 arma_extra_debug_sigprint(); 00461 00462 return Glue<T1, T2, glue_times>(X.get_ref(), Y.get_ref()); 00463 } 00464 00465 00466 00467 // 00468 // old operators 00469 // 00470 00471 // //! mat * scalar 00472 // template<typename mT> 00473 // arma_inline 00474 // const Op<Mat<mT>, op_scalar_times> 00475 // operator* 00476 // (const Mat<mT>& X, const mT k) 00477 // { 00478 // arma_extra_debug_sigprint(); 00479 // 00480 // return Op<Mat<mT>, op_scalar_times>(X,k); 00481 // } 00482 // 00483 // 00484 // 00485 // //! op * scalar 00486 // template<typename T1, typename op_type> 00487 // arma_inline 00488 // const Op< Op<T1,op_type>, op_scalar_times> 00489 // operator* 00490 // (const Op<T1,op_type>& X, const typename T1::elem_type k) 00491 // { 00492 // arma_extra_debug_sigprint(); 00493 // 00494 // return Op< Op<T1,op_type>, op_scalar_times>(X,k); 00495 // } 00496 // 00497 // 00498 // 00499 // //! op * scalar, level 2 00500 // template<typename T1> 00501 // arma_inline 00502 // const Op<T1,op_scalar_times> 00503 // operator* 00504 // (const Op<T1,op_scalar_times>& X, const typename T1::elem_type k) 00505 // { 00506 // arma_extra_debug_sigprint(); 00507 // 00508 // return Op<T1, op_scalar_times>(X.m, X.aux * k); 00509 // } 00510 // 00511 // 00512 // 00513 // //! glue * scalar 00514 // template<typename T1, typename T2, typename glue_type> 00515 // arma_inline 00516 // const Op<Glue<T1,T2,glue_type>, op_scalar_times> 00517 // operator* 00518 // (const Glue<T1,T2,glue_type>& X, const typename T1::elem_type k) 00519 // { 00520 // arma_extra_debug_sigprint(); 00521 // 00522 // return Op<Glue<T1,T2,glue_type>, op_scalar_times>(X,k); 00523 // } 00524 // 00525 // 00526 // 00527 // //! Op<mat,op_ones_full> * scalar 00528 // template<typename mT> 00529 // arma_inline 00530 // Mat<mT> 00531 // operator* 00532 // (const Op<Mat<mT>,op_ones_full>& X, const mT k) 00533 // { 00534 // arma_extra_debug_sigprint(); 00535 // 00536 // Mat<mT> tmp(X.aux_u32_a, X.aux_u32_b); 00537 // tmp.fill(k); 00538 // 00539 // return tmp; 00540 // } 00541 // 00542 // 00543 // 00544 // //! Op<mat,op_ones_diag> * scalar 00545 // template<typename mT> 00546 // arma_inline 00547 // Mat<mT> 00548 // operator* 00549 // (const Op<Mat<mT>,op_ones_diag>& X, const mT k) 00550 // { 00551 // arma_extra_debug_sigprint(); 00552 // 00553 // Mat<mT> out; 00554 // out.zeros(X.aux_u32_a, X.aux_u32_b); 00555 // 00556 // for(u32 i=0; i<out.n_rows; ++i) 00557 // { 00558 // out.at(i,i) = k; 00559 // } 00560 // 00561 // return out; 00562 // } 00563 // 00564 // 00565 // 00566 // //! scalar * mat 00567 // template<typename mT> 00568 // arma_inline 00569 // const Op<Mat<mT>, op_scalar_times> 00570 // operator* 00571 // (const mT k, const Mat<mT>& X) 00572 // { 00573 // arma_extra_debug_sigprint(); 00574 // 00575 // return Op<Mat<mT>, op_scalar_times>(X,k); // NOTE: order is swapped 00576 // } 00577 // 00578 // 00579 // 00580 // //! scalar * op 00581 // template<typename T1, typename op_type> 00582 // arma_inline 00583 // const Op<Op<T1,op_type>, op_scalar_times> 00584 // operator* 00585 // (const typename T1::elem_type k, const Op<T1,op_type>& X) 00586 // { 00587 // arma_extra_debug_sigprint(); 00588 // 00589 // return Op<Op<T1,op_type>, op_scalar_times>(X,k); // NOTE: order is swapped 00590 // } 00591 // 00592 // 00593 // 00594 // //! scalar * glue 00595 // template<typename T1, typename T2, typename glue_type> 00596 // arma_inline 00597 // const Op<Glue<T1,T2,glue_type>, op_scalar_times> 00598 // operator* 00599 // (const typename T1::elem_type k, const Glue<T1,T2,glue_type>& X) 00600 // { 00601 // arma_extra_debug_sigprint(); 00602 // 00603 // return Op<Glue<T1,T2,glue_type>, op_scalar_times>(X,k); // NOTE: order is swapped 00604 // } 00605 // 00606 // 00607 // 00608 // //! scalar * Op<mat,op_ones_full> 00609 // template<typename mT> 00610 // arma_inline 00611 // Mat<mT> 00612 // operator* 00613 // (const mT k, const Op<Mat<mT>,op_ones_full>& X) 00614 // { 00615 // arma_extra_debug_sigprint(); 00616 // 00617 // Mat<mT> tmp(X.aux_u32_a, X.aux_u32_b); 00618 // tmp.fill(k); 00619 // 00620 // return tmp; 00621 // } 00622 // 00623 // 00624 // 00625 // //! scalar * Op<mat,op_ones_diag> 00626 // template<typename mT> 00627 // arma_inline 00628 // Mat<mT> 00629 // operator* 00630 // (const mT k, const Op<Mat<mT>,op_ones_diag>& X) 00631 // { 00632 // arma_extra_debug_sigprint(); 00633 // 00634 // Mat<mT> out; 00635 // out.zeros(X.aux_u32_a, X.aux_u32_b); 00636 // 00637 // for(u32 i=0; i<out.n_rows; ++i) 00638 // out.at(i,i) = k; 00639 // 00640 // return out; 00641 // } 00642 // 00643 // 00644 // 00645 // //! mat * mat 00646 // template<typename mT> 00647 // arma_inline 00648 // const Glue<Mat<mT>, Mat<mT>, glue_times> 00649 // operator* 00650 // (const Mat<mT>& X, const Mat<mT>& Y) 00651 // { 00652 // arma_extra_debug_sigprint(); 00653 // 00654 // return Glue<Mat<mT>, Mat<mT>, glue_times>(X,Y); 00655 // } 00656 // 00657 // 00658 // 00659 // //! mat * diagmat(T1) 00660 // template<typename T1> 00661 // arma_inline 00662 // const Glue<Mat<typename T1::elem_type>, Op<T1,op_diagmat>, glue_times_diag> 00663 // operator* 00664 // (const Mat<typename T1::elem_type>& X, const Op<T1,op_diagmat>& Y) 00665 // { 00666 // arma_extra_debug_sigprint(); 00667 // 00668 // return Glue<Mat<typename T1::elem_type>, Op<T1,op_diagmat>, glue_times_diag>(X,Y); 00669 // } 00670 // 00671 // 00672 // 00673 // //! diagmat(T1) * mat 00674 // template<typename T1> 00675 // arma_inline 00676 // const Glue<Op<T1,op_diagmat>, Mat<typename T1::elem_type>, glue_times_diag> 00677 // operator* 00678 // (const Op<T1,op_diagmat>& X, const Mat<typename T1::elem_type>& Y) 00679 // { 00680 // arma_extra_debug_sigprint(); 00681 // 00682 // return Glue<Op<T1,op_diagmat>, Mat<typename T1::elem_type>, glue_times_diag>(X,Y); 00683 // } 00684 // 00685 // 00686 // 00687 // //! diagmat(T1) * diagmat(T2) 00688 // template<typename T1, typename T2> 00689 // arma_inline 00690 // const Glue< Op<T1,op_diagmat>, Op<T2,op_diagmat>, glue_times_diag> 00691 // operator* 00692 // (const Op<T1,op_diagmat>& X, const Op<T2,op_diagmat>& Y) 00693 // { 00694 // arma_extra_debug_sigprint(); 00695 // 00696 // return Glue< Op<T1,op_diagmat>, Op<T2,op_diagmat>, glue_times_diag>(X,Y); 00697 // } 00698 // 00699 // 00700 // 00701 // //! mat * colvec 00702 // template<typename mT> 00703 // arma_inline 00704 // const Glue<Mat<mT>, Col<mT>, glue_times> 00705 // operator* 00706 // (const Mat<mT>& X, const Col<mT>& Y) 00707 // { 00708 // arma_extra_debug_sigprint(); 00709 // 00710 // return Glue<Mat<mT>, Col<mT>, glue_times>(X,Y); 00711 // } 00712 // 00713 // 00714 // 00715 // //! mat * rowvec 00716 // template<typename mT> 00717 // arma_inline 00718 // const Glue<Mat<mT>, Row<mT>, glue_times> 00719 // operator* 00720 // (const Mat<mT>& X, const Row<mT>& Y) 00721 // { 00722 // arma_extra_debug_sigprint(); 00723 // 00724 // return Glue<Mat<mT>, Row<mT>, glue_times>(X,Y); 00725 // } 00726 // 00727 // 00728 // 00729 // //! mat * op 00730 // template<typename T1, typename op_type> 00731 // arma_inline 00732 // const Glue<Mat<typename T1::elem_type>, Op<T1,op_type>, glue_times> 00733 // operator* 00734 // (const Mat<typename T1::elem_type>& X, const Op<T1,op_type>& Y) 00735 // { 00736 // arma_extra_debug_sigprint(); 00737 // 00738 // return Glue<Mat<typename T1::elem_type>, Op<T1,op_type>, glue_times>(X,Y); 00739 // } 00740 // 00741 // 00742 // 00743 // //! diagmat(T1) * op 00744 // template<typename T1, typename T2, typename op_type> 00745 // arma_inline 00746 // const Glue< Op<T1,op_diagmat>, Op<T2,op_type>, glue_times_diag> 00747 // operator* 00748 // (const Op<T1,op_diagmat>& X, const Op<T2,op_type>& Y) 00749 // { 00750 // arma_extra_debug_sigprint(); 00751 // 00752 // return Glue< Op<T1,op_diagmat>, Op<T2,op_type>, glue_times_diag>(X,Y); 00753 // } 00754 // 00755 // 00756 // 00757 // //! rowvec * mat 00758 // template<typename mT> 00759 // arma_inline 00760 // const Glue<Row<mT>, Mat<mT>, glue_times> 00761 // operator* 00762 // (const Row<mT>& X, const Mat<mT>& Y) 00763 // { 00764 // arma_extra_debug_sigprint(); 00765 // 00766 // return Glue<Row<mT>, Mat<mT>, glue_times>(X,Y); 00767 // } 00768 // 00769 // 00770 // 00771 // //! rowvec * op 00772 // template<typename T1, typename op_type> 00773 // arma_inline 00774 // const Glue<Row<typename T1::elem_type>, Op<T1,op_type>, glue_times> 00775 // operator* 00776 // (const Row<typename T1::elem_type>& X, const Op<T1,op_type>& Y) 00777 // { 00778 // arma_extra_debug_sigprint(); 00779 // 00780 // return Glue<Row<typename T1::elem_type>, Op<T1,op_type>, glue_times>(X,Y); 00781 // } 00782 // 00783 // 00784 // 00785 // //! colvec * rowvec 00786 // template<typename mT> 00787 // arma_inline 00788 // const Glue<Col<mT>, Row<mT>, glue_times> 00789 // operator* 00790 // (const Col<mT>& X, const Row<mT>& Y) 00791 // { 00792 // arma_extra_debug_sigprint(); 00793 // 00794 // return Glue<Col<mT>, Row<mT>, glue_times>(X,Y); 00795 // } 00796 // 00797 // 00798 // //! colvec * op 00799 // template<typename T1, typename op_type> 00800 // arma_inline 00801 // const Glue<Col<typename T1::elem_type>, Op<T1,op_type>, glue_times> 00802 // operator* 00803 // (const Col<typename T1::elem_type>& X, const Op<T1,op_type>& Y) 00804 // { 00805 // arma_extra_debug_sigprint(); 00806 // 00807 // return Glue<Col<typename T1::elem_type>, Op<T1,op_type>, glue_times>(X,Y); 00808 // } 00809 // 00810 // 00811 // 00812 // //! op * mat 00813 // template<typename T1, typename op_type> 00814 // arma_inline 00815 // const Glue<Op<T1,op_type>, Mat<typename T1::elem_type>, glue_times> 00816 // operator* 00817 // (const Op<T1,op_type>& X, const Mat<typename T1::elem_type>& Y) 00818 // { 00819 // arma_extra_debug_sigprint(); 00820 // 00821 // return Glue<Op<T1,op_type>, Mat<typename T1::elem_type>, glue_times>(X,Y); 00822 // } 00823 // 00824 // 00825 // 00826 // //! op * diagmat(T2) 00827 // template<typename T1, typename op_type, typename T2> 00828 // arma_inline 00829 // const Glue<Op<T1,op_type>, Op<T2,op_diagmat>, glue_times_diag> 00830 // operator* 00831 // (const Op<T1,op_type>& X, const Op<T2,op_diagmat>& Y) 00832 // { 00833 // arma_extra_debug_sigprint(); 00834 // 00835 // return Glue<Op<T1,op_type>, Op<T2,op_diagmat>, glue_times_diag>(X,Y); 00836 // } 00837 // 00838 // 00839 // 00840 // //! op * colvec 00841 // template<typename T1, typename op_type> 00842 // arma_inline 00843 // const Glue<Op<T1,op_type>, Col<typename T1::elem_type>, glue_times> 00844 // operator* 00845 // (const Op<T1,op_type>& X, const Col<typename T1::elem_type>& Y) 00846 // { 00847 // arma_extra_debug_sigprint(); 00848 // 00849 // return Glue<Op<T1,op_type>, Col<typename T1::elem_type>, glue_times>(X,Y); 00850 // } 00851 // 00852 // 00853 // 00854 // //! op * rowvec 00855 // template<typename T1, typename op_type> 00856 // arma_inline 00857 // const Glue<Op<T1,op_type>, Row<typename T1::elem_type>, glue_times> 00858 // operator* 00859 // (const Op<T1,op_type>& X, const Row<typename T1::elem_type>& Y) 00860 // { 00861 // arma_extra_debug_sigprint(); 00862 // 00863 // return Glue<Op<T1,op_type>, Row<typename T1::elem_type>, glue_times>(X,Y); 00864 // } 00865 // 00866 // 00867 // 00868 // //! op * glue 00869 // template<typename T1, typename op_type, typename T2, typename T3, typename glue_type> 00870 // arma_inline 00871 // const Glue<Op<T1,op_type>, Glue<T2, T3, glue_type>, glue_times> 00872 // operator* 00873 // (const Op<T1,op_type>& X, const Glue<T2, T3, glue_type>& Y) 00874 // { 00875 // arma_extra_debug_sigprint(); 00876 // 00877 // return Glue<Op<T1,op_type>, Glue<T2, T3, glue_type>, glue_times>(X,Y); 00878 // } 00879 // 00880 // 00881 // 00882 // //! glue * op 00883 // template<typename T1, typename op_type, typename T2, typename T3, typename glue_type> 00884 // arma_inline 00885 // const Glue<Glue<T2, T3, glue_type>, Op<T1,op_type>, glue_times> 00886 // operator* 00887 // (const Glue<T2, T3, glue_type>& X, const Op<T1,op_type>& Y) 00888 // { 00889 // arma_extra_debug_sigprint(); 00890 // 00891 // return Glue<Glue<T2, T3, glue_type>, Op<T1,op_type>, glue_times>(X,Y); 00892 // } 00893 // 00894 // 00895 // 00896 // //! glue * mat 00897 // template<typename T1, typename T2, typename glue_type> 00898 // arma_inline 00899 // const Glue<Glue<T1, T2,glue_type>, Mat<typename T1::elem_type>, glue_times> 00900 // operator* 00901 // (const Glue<T1, T2,glue_type>& X, const Mat<typename T1::elem_type>& Y) 00902 // { 00903 // arma_extra_debug_sigprint(); 00904 // 00905 // return Glue<Glue<T1, T2,glue_type>, Mat<typename T1::elem_type>, glue_times>(X,Y); 00906 // } 00907 // 00908 // 00909 // 00910 // //! glue * diagmat(T3) 00911 // template<typename T1, typename T2, typename glue_type, typename T3> 00912 // arma_inline 00913 // const Glue<Glue<T1, T2,glue_type>, Op<T3,op_diagmat>, glue_times_diag> 00914 // operator* 00915 // (const Glue<T1, T2,glue_type>& X, const Op<T3,op_diagmat>& Y) 00916 // { 00917 // arma_extra_debug_sigprint(); 00918 // 00919 // return Glue<Glue<T1, T2,glue_type>, Op<T3,op_diagmat>, glue_times_diag>(X,Y); 00920 // } 00921 // 00922 // 00923 // 00924 // //! glue * colvec 00925 // template<typename T1, typename T2, typename glue_type> 00926 // arma_inline 00927 // const Glue<Glue<T1, T2,glue_type>, Col<typename T1::elem_type>, glue_times> 00928 // operator* 00929 // (const Glue<T1, T2,glue_type>& X, const Col<typename T1::elem_type>& Y) 00930 // { 00931 // arma_extra_debug_sigprint(); 00932 // 00933 // return Glue<Glue<T1, T2,glue_type>, Col<typename T1::elem_type>, glue_times>(X,Y); 00934 // } 00935 // 00936 // 00937 // //! glue * rowvec 00938 // template<typename T1, typename T2, typename glue_type> 00939 // arma_inline 00940 // const Glue<Glue<T1, T2,glue_type>, Row<typename T1::elem_type>, glue_times> 00941 // operator* 00942 // (const Glue<T1, T2,glue_type>& X, const Row<typename T1::elem_type>& Y) 00943 // { 00944 // arma_extra_debug_sigprint(); 00945 // 00946 // return Glue<Glue<T1, T2,glue_type>, Row<typename T1::elem_type>, glue_times>(X,Y); 00947 // } 00948 // 00949 // 00950 // 00951 // //! mat * glue 00952 // template<typename T1, typename T2, typename glue_type> 00953 // arma_inline 00954 // const Glue<Mat<typename T1::elem_type>, Glue<T1, T2,glue_type>, glue_times> 00955 // operator* 00956 // (const Mat<typename T1::elem_type>& X, const Glue<T1, T2,glue_type>& Y) 00957 // { 00958 // arma_extra_debug_sigprint(); 00959 // 00960 // return Glue<Mat<typename T1::elem_type>, Glue<T1, T2,glue_type>, glue_times>(X,Y); 00961 // } 00962 // 00963 // 00964 // 00965 // //! diagmat(T1) * glue 00966 // template<typename T1, typename T2, typename T3, typename glue_type> 00967 // arma_inline 00968 // const Glue<Op<T1,op_diagmat>, Glue<T2,T3,glue_type>, glue_times_diag> 00969 // operator* 00970 // (const Op<T1,op_diagmat>& X, const Glue<T2,T3,glue_type>& Y) 00971 // { 00972 // arma_extra_debug_sigprint(); 00973 // 00974 // return Glue< Op<T1,op_diagmat>, Glue<T1, T2,glue_type>, glue_times_diag>(X,Y); 00975 // } 00976 // 00977 // 00978 // 00979 // //! colvec * glue 00980 // template<typename T1, typename T2, typename glue_type> 00981 // arma_inline 00982 // const Glue<Col<typename T1::elem_type>, Glue<T1, T2,glue_type>, glue_times> 00983 // operator* 00984 // (const Col<typename T1::elem_type>& X, const Glue<T1, T2,glue_type>& Y) 00985 // { 00986 // arma_extra_debug_sigprint(); 00987 // 00988 // return Glue<Col<typename T1::elem_type>, Glue<T1, T2,glue_type>, glue_times>(X,Y); 00989 // } 00990 // 00991 // 00992 // 00993 // //! rowvec * glue 00994 // template<typename T1, typename T2, typename glue_type> 00995 // arma_inline 00996 // const Glue<Row<typename T1::elem_type>, Glue<T1, T2,glue_type>, glue_times> 00997 // operator* 00998 // (const Row<typename T1::elem_type>& X, const Glue<T1, T2,glue_type>& Y) 00999 // { 01000 // arma_extra_debug_sigprint(); 01001 // 01002 // return Glue<Row<typename T1::elem_type>, Glue<T1, T2,glue_type>, glue_times>(X,Y); 01003 // } 01004 // 01005 // 01006 // 01007 // //! op * op 01008 // template<typename T1, typename op_type1, typename T2, typename op_type2> 01009 // arma_inline 01010 // const Glue<Op<T1,op_type1>, Op<T2,op_type2>, glue_times> 01011 // operator* 01012 // (const Op<T1,op_type1>& X, const Op<T2,op_type2>& Y) 01013 // { 01014 // arma_extra_debug_sigprint(); 01015 // 01016 // return Glue<Op<T1,op_type1>, Op<T2,op_type2>, glue_times>(X,Y); 01017 // } 01018 // 01019 // 01020 // 01021 // //! glue * glue 01022 // template<typename T1, typename T2, typename glue_type1, typename T3, typename T4, typename glue_type2> 01023 // arma_inline 01024 // const Glue<Glue<T1,T2,glue_type1>, Glue<T3,T4,glue_type2>, glue_times> 01025 // operator* 01026 // (const Glue<T1,T2,glue_type1>& X, const Glue<T3,T4,glue_type2>& Y) 01027 // { 01028 // arma_extra_debug_sigprint(); 01029 // 01030 // return Glue<Glue<T1,T2,glue_type1>, Glue<T3,T4,glue_type2>, glue_times>(X,Y); 01031 // } 01032 // 01033 // 01034 // 01035 // //! Base * subview 01036 // template<typename T1> 01037 // arma_inline 01038 // const Glue<T1, subview<typename T1::elem_type>, glue_times> 01039 // operator* 01040 // (const Base<T1>& X, const subview<typename T1::elem_type>& Y) 01041 // { 01042 // arma_extra_debug_sigprint(); 01043 // 01044 // return Glue<T1, subview<typename T1::elem_type>, glue_times>(X.get_ref(),Y); 01045 // } 01046 // 01047 // 01048 // 01049 // //! subview * Base 01050 // template<typename T1> 01051 // arma_inline 01052 // const Glue<subview<typename T1::elem_type>, T1, glue_times> 01053 // operator* 01054 // (const subview<typename T1::elem_type>& X, const Base<T1>& Y) 01055 // { 01056 // arma_extra_debug_sigprint(); 01057 // 01058 // return Glue<subview<typename T1::elem_type>, T1, glue_times>(X,Y.get_ref()); 01059 // } 01060 // 01061 // 01062 // 01063 // //! Base * diagview 01064 // template<typename T1> 01065 // arma_inline 01066 // const Glue<T1, diagview<typename T1::elem_type>, glue_times> 01067 // operator* 01068 // (const Base<T1>& X, const diagview<typename T1::elem_type>& Y) 01069 // { 01070 // arma_extra_debug_sigprint(); 01071 // 01072 // return Glue<T1, diagview<typename T1::elem_type>, glue_times>(X.get_ref(),Y); 01073 // } 01074 // 01075 // 01076 // 01077 // //! diagview * Base 01078 // template<typename T1> 01079 // arma_inline 01080 // const Glue<diagview<typename T1::elem_type>, T1, glue_times> 01081 // operator* 01082 // (const diagview<typename T1::elem_type>& X, const Base<T1>& Y) 01083 // { 01084 // arma_extra_debug_sigprint(); 01085 // 01086 // return Glue<diagview<typename T1::elem_type>, T1, glue_times>(X,Y.get_ref()); 01087 // } 01088 // 01089 // 01090 // 01091 // //! scalar * subview 01092 // template<typename mT> 01093 // arma_inline 01094 // const Op<subview<mT>, op_scalar_times> 01095 // operator* 01096 // (const mT k, const subview<mT>& X) 01097 // { 01098 // arma_extra_debug_sigprint(); 01099 // 01100 // return Op<subview<mT>, op_scalar_times>(X,k); 01101 // } 01102 // 01103 // 01104 // 01105 // //! scalar * diagview 01106 // template<typename mT> 01107 // arma_inline 01108 // const Op<diagview<mT>, op_scalar_times> 01109 // operator* 01110 // (const mT k, const diagview<mT>& X) 01111 // { 01112 // arma_extra_debug_sigprint(); 01113 // 01114 // return Op<diagview<mT>, op_scalar_times>(X,k); 01115 // } 01116 // 01117 // 01118 // 01119 // //! subview * scalar 01120 // template<typename mT> 01121 // arma_inline 01122 // const Op<subview<mT>, op_scalar_times> 01123 // operator* 01124 // (const subview<mT>& X, const mT k) 01125 // { 01126 // arma_extra_debug_sigprint(); 01127 // 01128 // return Op<subview<mT>, op_scalar_times>(X,k); 01129 // } 01130 // 01131 // 01132 // 01133 // //! diagview * scalar 01134 // template<typename mT> 01135 // arma_inline 01136 // const Op<diagview<mT>, op_scalar_times> 01137 // operator* 01138 // (const diagview<mT>& X, const mT k) 01139 // { 01140 // arma_extra_debug_sigprint(); 01141 // 01142 // return Op<diagview<mT>, op_scalar_times>(X,k); 01143 // } 01144 // 01145 01146 01147 //! @}