~ubuntu-branches/ubuntu/trusty/r-cran-rcpparmadillo/trusty-proposed

« back to all changes in this revision

Viewing changes to inst/include/armadillo_bits/Mat_meat.hpp

  • Committer: Package Import Robot
  • Author(s): Dirk Eddelbuettel
  • Date: 2013-08-12 19:10:20 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20130812191020-4i0swxrz8v6i503v
Tags: 0.3.910.0-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (C) 2008-2013 Conrad Sanderson
1
2
// Copyright (C) 2008-2013 NICTA (www.nicta.com.au)
2
 
// Copyright (C) 2008-2013 Conrad Sanderson
3
3
// Copyright (C) 2012 Ryan Curtin
4
4
// 
5
5
// This Source Code Form is subject to the terms of the Mozilla Public
664
664
  
665
665
  typedef typename T1::elem_type T;
666
666
  
667
 
  arma_type_check(( is_complex<eT>::value == false ));   //!< compile-time abort if eT isn't std::complex
668
 
  arma_type_check(( is_complex< T>::value == true  ));   //!< compile-time abort if T is std::complex
 
667
  arma_type_check(( is_complex<eT>::value == false ));   //!< compile-time abort if eT is not std::complex
 
668
  arma_type_check(( is_complex< T>::value == true  ));   //!< compile-time abort if  T is     std::complex
669
669
  
670
 
  arma_type_check(( is_same_type< std::complex<T>, eT >::value == false ));   //!< compile-time abort if types are not compatible
 
670
  arma_type_check(( is_same_type< std::complex<T>, eT >::no ));   //!< compile-time abort if types are not compatible
671
671
  
672
672
  const Proxy<T1> PX(X.get_ref());
673
673
  const Proxy<T2> PY(Y.get_ref());
3457
3457
  {
3458
3458
  arma_extra_debug_sigprint_this(this);
3459
3459
  
3460
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3460
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3461
3461
  
3462
3462
  init_cold();
3463
3463
  
3474
3474
  {
3475
3475
  arma_extra_debug_sigprint();
3476
3476
  
3477
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3477
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3478
3478
  
3479
3479
  init_warm(X.n_rows, X.n_cols);
3480
3480
  
3493
3493
  {
3494
3494
  arma_extra_debug_sigprint();
3495
3495
  
3496
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3496
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3497
3497
  
3498
3498
  X.apply_inplace_plus(*this);
3499
3499
  
3510
3510
  {
3511
3511
  arma_extra_debug_sigprint();
3512
3512
  
3513
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3513
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3514
3514
  
3515
3515
  X.apply_inplace_minus(*this);
3516
3516
  
3527
3527
  {
3528
3528
  arma_extra_debug_sigprint();
3529
3529
  
3530
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3530
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3531
3531
  
3532
3532
  const Mat<eT> tmp(X);
3533
3533
  
3544
3544
  {
3545
3545
  arma_extra_debug_sigprint();
3546
3546
  
3547
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3547
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3548
3548
  
3549
3549
  X.apply_inplace_schur(*this);
3550
3550
  
3561
3561
  {
3562
3562
  arma_extra_debug_sigprint();
3563
3563
  
3564
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3564
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3565
3565
  
3566
3566
  X.apply_inplace_div(*this);
3567
3567
  
3584
3584
  {
3585
3585
  arma_extra_debug_sigprint_this(this);
3586
3586
 
3587
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3587
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3588
3588
  
3589
3589
  op_type::apply(*this, X);
3590
3590
  }
3600
3600
  {
3601
3601
  arma_extra_debug_sigprint();
3602
3602
 
3603
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3603
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3604
3604
  
3605
3605
  op_type::apply(*this, X);
3606
3606
  
3618
3618
  {
3619
3619
  arma_extra_debug_sigprint();
3620
3620
  
3621
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3621
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3622
3622
  
3623
3623
  const Mat<eT> m(X);
3624
3624
  
3636
3636
  {
3637
3637
  arma_extra_debug_sigprint();
3638
3638
  
3639
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3639
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3640
3640
  
3641
3641
  const Mat<eT> m(X);
3642
3642
  
3654
3654
  {
3655
3655
  arma_extra_debug_sigprint();
3656
3656
  
3657
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3657
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3658
3658
  
3659
3659
  glue_times::apply_inplace(*this, X);
3660
3660
  
3672
3672
  {
3673
3673
  arma_extra_debug_sigprint();
3674
3674
  
3675
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3675
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3676
3676
  
3677
3677
  const Mat<eT> m(X);
3678
3678
  
3690
3690
  {
3691
3691
  arma_extra_debug_sigprint();
3692
3692
  
3693
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3693
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3694
3694
  
3695
3695
  const Mat<eT> m(X);
3696
3696
  
3713
3713
  {
3714
3714
  arma_extra_debug_sigprint_this(this);
3715
3715
  
3716
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3716
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3717
3717
  
3718
3718
  init_cold();
3719
3719
  
3731
3731
  {
3732
3732
  arma_extra_debug_sigprint();
3733
3733
  
3734
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3734
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3735
3735
  
3736
3736
  const bool bad_alias = (eOp<T1, eop_type>::proxy_type::has_subview  &&  X.P.is_alias(*this));
3737
3737
  
3763
3763
  {
3764
3764
  arma_extra_debug_sigprint();
3765
3765
 
3766
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3766
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3767
3767
  
3768
3768
  eop_type::apply_inplace_plus(*this, X);
3769
3769
  
3780
3780
  {
3781
3781
  arma_extra_debug_sigprint();
3782
3782
 
3783
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3783
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3784
3784
  
3785
3785
  eop_type::apply_inplace_minus(*this, X);
3786
3786
  
3797
3797
  {
3798
3798
  arma_extra_debug_sigprint();
3799
3799
  
3800
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3800
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3801
3801
  
3802
3802
  glue_times::apply_inplace(*this, X);
3803
3803
  
3814
3814
  {
3815
3815
  arma_extra_debug_sigprint();
3816
3816
 
3817
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3817
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3818
3818
  
3819
3819
  eop_type::apply_inplace_schur(*this, X);
3820
3820
  
3831
3831
  {
3832
3832
  arma_extra_debug_sigprint();
3833
3833
 
3834
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
 
3834
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
3835
3835
  
3836
3836
  eop_type::apply_inplace_div(*this, X);
3837
3837
  
3969
3969
  {
3970
3970
  arma_extra_debug_sigprint_this(this);
3971
3971
  
3972
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
3973
 
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::value == false ));
 
3972
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
 
3973
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::no ));
3974
3974
  
3975
3975
  glue_type::apply(*this, X);
3976
3976
  }
3986
3986
  {
3987
3987
  arma_extra_debug_sigprint();
3988
3988
  
3989
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
3990
 
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::value == false ));
 
3989
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
 
3990
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::no ));
3991
3991
  
3992
3992
  glue_type::apply(*this, X);
3993
3993
  
4005
4005
  {
4006
4006
  arma_extra_debug_sigprint();
4007
4007
  
4008
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
4009
 
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::value == false ));
 
4008
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
 
4009
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::no ));
4010
4010
  
4011
4011
  const Mat<eT> m(X);
4012
4012
  
4024
4024
  {
4025
4025
  arma_extra_debug_sigprint();
4026
4026
  
4027
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
4028
 
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::value == false ));
 
4027
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
 
4028
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::no ));
4029
4029
  
4030
4030
  const Mat<eT> m(X);
4031
4031
  
4043
4043
  {
4044
4044
  arma_extra_debug_sigprint();
4045
4045
  
4046
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
4047
 
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::value == false ));
 
4046
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
 
4047
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::no ));
4048
4048
  
4049
4049
  glue_times::apply_inplace(*this, X);
4050
4050
  
4062
4062
  {
4063
4063
  arma_extra_debug_sigprint();
4064
4064
  
4065
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
4066
 
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::value == false ));
 
4065
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
 
4066
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::no ));
4067
4067
  
4068
4068
  const Mat<eT> m(X);
4069
4069
  
4081
4081
  {
4082
4082
  arma_extra_debug_sigprint();
4083
4083
  
4084
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
4085
 
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::value == false ));
 
4084
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
 
4085
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::no ));
4086
4086
  
4087
4087
  const Mat<eT> m(X);
4088
4088
  
4135
4135
  {
4136
4136
  arma_extra_debug_sigprint_this(this);
4137
4137
  
4138
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
4139
 
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::value == false ));
 
4138
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
 
4139
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::no ));
4140
4140
  
4141
4141
  init_cold();
4142
4142
  
4154
4154
  {
4155
4155
  arma_extra_debug_sigprint();
4156
4156
  
4157
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
4158
 
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::value == false ));
 
4157
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
 
4158
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::no ));
4159
4159
  
4160
4160
  const bool bad_alias =
4161
4161
    (
4193
4193
  {
4194
4194
  arma_extra_debug_sigprint();
4195
4195
  
4196
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
4197
 
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::value == false ));
 
4196
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
 
4197
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::no ));
4198
4198
  
4199
4199
  eglue_type::apply_inplace_plus(*this, X);
4200
4200
  
4212
4212
  {
4213
4213
  arma_extra_debug_sigprint();
4214
4214
  
4215
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
4216
 
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::value == false ));
 
4215
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
 
4216
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::no ));
4217
4217
  
4218
4218
  eglue_type::apply_inplace_minus(*this, X);
4219
4219
  
4230
4230
  {
4231
4231
  arma_extra_debug_sigprint();
4232
4232
  
4233
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
4234
 
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::value == false ));
 
4233
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
 
4234
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::no ));
4235
4235
  
4236
4236
  glue_times::apply_inplace(*this, X);
4237
4237
  return *this;
4247
4247
  {
4248
4248
  arma_extra_debug_sigprint();
4249
4249
  
4250
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
4251
 
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::value == false ));
 
4250
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
 
4251
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::no ));
4252
4252
  
4253
4253
  eglue_type::apply_inplace_schur(*this, X);
4254
4254
  return *this;
4264
4264
  {
4265
4265
  arma_extra_debug_sigprint();
4266
4266
  
4267
 
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::value == false ));
4268
 
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::value == false ));
 
4267
  arma_type_check(( is_same_type< eT, typename T1::elem_type >::no ));
 
4268
  arma_type_check(( is_same_type< eT, typename T2::elem_type >::no ));
4269
4269
  
4270
4270
  eglue_type::apply_inplace_div(*this, X);
4271
4271
  return *this;