Skip to content

Commit fc20cfc

Browse files
committed
Increase the visibility of sugar functions
1 parent 7a0cb79 commit fc20cfc

File tree

4 files changed

+72
-68
lines changed

4 files changed

+72
-68
lines changed

inst/include/Rcpp/sugar/operators/divides.h

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -406,43 +406,44 @@ namespace sugar{
406406
} ;
407407

408408

409-
}
410409
}
411410

412411
template <int RTYPE,bool NA, typename T>
413-
inline Rcpp::sugar::Divides_Vector_Primitive< RTYPE , NA, T >
412+
inline sugar::Divides_Vector_Primitive< RTYPE , NA, T >
414413
operator/(
415-
const Rcpp::VectorBase<RTYPE,NA,T>& lhs,
416-
typename Rcpp::traits::storage_type<RTYPE>::type rhs
414+
const VectorBase<RTYPE,NA,T>& lhs,
415+
typename traits::storage_type<RTYPE>::type rhs
417416
) {
418-
return Rcpp::sugar::Divides_Vector_Primitive<RTYPE,NA,T>( lhs, rhs ) ;
417+
return sugar::Divides_Vector_Primitive<RTYPE,NA,T>( lhs, rhs ) ;
419418
}
420419

421420

422421
template <int RTYPE,bool NA, typename T>
423-
inline Rcpp::sugar::Divides_Primitive_Vector< RTYPE , NA,T>
422+
inline sugar::Divides_Primitive_Vector< RTYPE , NA,T>
424423
operator/(
425-
typename Rcpp::traits::storage_type<RTYPE>::type lhs,
426-
const Rcpp::VectorBase<RTYPE,NA,T>& rhs
424+
typename traits::storage_type<RTYPE>::type lhs,
425+
const VectorBase<RTYPE,NA,T>& rhs
427426
) {
428-
return Rcpp::sugar::Divides_Primitive_Vector<RTYPE,NA,T>( lhs, rhs ) ;
427+
return sugar::Divides_Primitive_Vector<RTYPE,NA,T>( lhs, rhs ) ;
429428
}
430429

431430
template <int RTYPE,bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
432-
inline Rcpp::sugar::Divides_Vector_Vector<
431+
inline sugar::Divides_Vector_Vector<
433432
RTYPE ,
434433
LHS_NA, LHS_T,
435434
RHS_NA, RHS_T
436435
>
437436
operator/(
438-
const Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T>& lhs,
439-
const Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
437+
const VectorBase<RTYPE,LHS_NA,LHS_T>& lhs,
438+
const VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
440439
) {
441-
return Rcpp::sugar::Divides_Vector_Vector<
440+
return sugar::Divides_Vector_Vector<
442441
RTYPE,
443442
LHS_NA,LHS_T,
444443
RHS_NA,RHS_T
445444
>( lhs, rhs ) ;
446445
}
447446

447+
}
448+
448449
#endif

inst/include/Rcpp/sugar/operators/minus.h

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -410,43 +410,44 @@ namespace sugar{
410410
} ;
411411

412412

413-
}
414413
}
415414

416415
template <int RTYPE,bool NA, typename T>
417-
inline Rcpp::sugar::Minus_Vector_Primitive< RTYPE , NA, T >
416+
inline sugar::Minus_Vector_Primitive< RTYPE , NA, T >
418417
operator-(
419-
const Rcpp::VectorBase<RTYPE,NA,T>& lhs,
420-
typename Rcpp::traits::storage_type<RTYPE>::type rhs
418+
const VectorBase<RTYPE,NA,T>& lhs,
419+
typename traits::storage_type<RTYPE>::type rhs
421420
) {
422-
return Rcpp::sugar::Minus_Vector_Primitive<RTYPE,NA,T>( lhs, rhs ) ;
421+
return sugar::Minus_Vector_Primitive<RTYPE,NA,T>( lhs, rhs ) ;
423422
}
424423

425424

426425
template <int RTYPE,bool NA, typename T>
427-
inline Rcpp::sugar::Minus_Primitive_Vector< RTYPE , NA,T>
426+
inline sugar::Minus_Primitive_Vector< RTYPE , NA,T>
428427
operator-(
429-
typename Rcpp::traits::storage_type<RTYPE>::type lhs,
430-
const Rcpp::VectorBase<RTYPE,NA,T>& rhs
428+
typename traits::storage_type<RTYPE>::type lhs,
429+
const VectorBase<RTYPE,NA,T>& rhs
431430
) {
432-
return Rcpp::sugar::Minus_Primitive_Vector<RTYPE,NA,T>( lhs, rhs ) ;
431+
return sugar::Minus_Primitive_Vector<RTYPE,NA,T>( lhs, rhs ) ;
433432
}
434433

435434
template <int RTYPE,bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
436-
inline Rcpp::sugar::Minus_Vector_Vector<
435+
inline sugar::Minus_Vector_Vector<
437436
RTYPE ,
438437
LHS_NA, LHS_T,
439438
RHS_NA, RHS_T
440439
>
441440
operator-(
442-
const Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T>& lhs,
443-
const Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
441+
const VectorBase<RTYPE,LHS_NA,LHS_T>& lhs,
442+
const VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
444443
) {
445-
return Rcpp::sugar::Minus_Vector_Vector<
444+
return sugar::Minus_Vector_Vector<
446445
RTYPE,
447446
LHS_NA,LHS_T,
448447
RHS_NA,RHS_T
449448
>( lhs, rhs ) ;
450449
}
451450

451+
}
452+
452453
#endif

inst/include/Rcpp/sugar/operators/plus.h

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -441,63 +441,64 @@ namespace sugar{
441441
} ;
442442

443443
}
444-
}
445444

446445
template <int RTYPE,bool NA, typename T>
447-
inline Rcpp::sugar::Plus_Vector_Primitive<RTYPE,NA,T>
446+
inline sugar::Plus_Vector_Primitive<RTYPE,NA,T>
448447
operator+(
449-
const Rcpp::VectorBase<RTYPE,NA,T>& lhs,
450-
typename Rcpp::traits::storage_type<RTYPE>::type rhs
448+
const VectorBase<RTYPE,NA,T>& lhs,
449+
typename traits::storage_type<RTYPE>::type rhs
451450
) {
452-
return Rcpp::sugar::Plus_Vector_Primitive<RTYPE,NA,T>( lhs, rhs ) ;
451+
return sugar::Plus_Vector_Primitive<RTYPE,NA,T>( lhs, rhs ) ;
453452
}
454453

455454

456455
template <int RTYPE,bool NA, typename T>
457-
inline Rcpp::sugar::Plus_Vector_Primitive< RTYPE , NA , T >
456+
inline sugar::Plus_Vector_Primitive< RTYPE , NA , T >
458457
operator+(
459-
typename Rcpp::traits::storage_type<RTYPE>::type rhs,
460-
const Rcpp::VectorBase<RTYPE,NA,T>& lhs
458+
typename traits::storage_type<RTYPE>::type rhs,
459+
const VectorBase<RTYPE,NA,T>& lhs
461460
) {
462-
return Rcpp::sugar::Plus_Vector_Primitive<RTYPE,NA, T >( lhs, rhs ) ;
461+
return sugar::Plus_Vector_Primitive<RTYPE,NA, T >( lhs, rhs ) ;
463462
}
464463

465464

466465

467466
template <int RTYPE,bool NA, typename T>
468-
inline Rcpp::sugar::Plus_Vector_Primitive_nona<RTYPE,NA,T>
467+
inline sugar::Plus_Vector_Primitive_nona<RTYPE,NA,T>
469468
operator+(
470-
const Rcpp::VectorBase<RTYPE,NA,T>& lhs,
471-
typename Rcpp::sugar::NonaPrimitive< typename Rcpp::traits::storage_type<RTYPE>::type > rhs
469+
const VectorBase<RTYPE,NA,T>& lhs,
470+
typename sugar::NonaPrimitive< typename traits::storage_type<RTYPE>::type > rhs
472471
) {
473-
return Rcpp::sugar::Plus_Vector_Primitive_nona<RTYPE,NA,T>( lhs, rhs ) ;
472+
return sugar::Plus_Vector_Primitive_nona<RTYPE,NA,T>( lhs, rhs ) ;
474473
}
475474

476475
template <int RTYPE,bool NA, typename T>
477-
inline Rcpp::sugar::Plus_Vector_Primitive_nona< RTYPE , NA , T >
476+
inline sugar::Plus_Vector_Primitive_nona< RTYPE , NA , T >
478477
operator+(
479-
typename Rcpp::sugar::NonaPrimitive< typename Rcpp::traits::storage_type<RTYPE>::type > rhs,
480-
const Rcpp::VectorBase<RTYPE,NA,T>& lhs
478+
typename sugar::NonaPrimitive< typename traits::storage_type<RTYPE>::type > rhs,
479+
const VectorBase<RTYPE,NA,T>& lhs
481480
) {
482-
return Rcpp::sugar::Plus_Vector_Primitive_nona<RTYPE,NA, T >( lhs, rhs ) ;
481+
return sugar::Plus_Vector_Primitive_nona<RTYPE,NA, T >( lhs, rhs ) ;
483482
}
484483

485484

486485
template <int RTYPE,bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
487-
inline Rcpp::sugar::Plus_Vector_Vector<
486+
inline sugar::Plus_Vector_Vector<
488487
RTYPE ,
489488
LHS_NA, LHS_T,
490489
RHS_NA, RHS_T
491490
>
492491
operator+(
493-
const Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T>& lhs,
494-
const Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
492+
const VectorBase<RTYPE,LHS_NA,LHS_T>& lhs,
493+
const VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
495494
) {
496-
return Rcpp::sugar::Plus_Vector_Vector<
495+
return sugar::Plus_Vector_Vector<
497496
RTYPE,
498497
LHS_NA, LHS_T,
499498
RHS_NA, RHS_T
500499
>( lhs, rhs ) ;
501500
}
502501

502+
}
503+
503504
#endif

inst/include/Rcpp/sugar/operators/times.h

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -423,63 +423,64 @@ namespace sugar{
423423
} ;
424424

425425
}
426-
}
427426

428427
template <int RTYPE,bool NA, typename T>
429-
inline Rcpp::sugar::Times_Vector_Primitive<RTYPE,NA,T>
428+
inline sugar::Times_Vector_Primitive<RTYPE,NA,T>
430429
operator*(
431-
const Rcpp::VectorBase<RTYPE,NA,T>& lhs,
432-
typename Rcpp::traits::storage_type<RTYPE>::type rhs
430+
const VectorBase<RTYPE,NA,T>& lhs,
431+
typename traits::storage_type<RTYPE>::type rhs
433432
) {
434-
return Rcpp::sugar::Times_Vector_Primitive<RTYPE,NA,T>( lhs, rhs ) ;
433+
return sugar::Times_Vector_Primitive<RTYPE,NA,T>( lhs, rhs ) ;
435434
}
436435

437436

438437
template <int RTYPE,bool NA, typename T>
439-
inline Rcpp::sugar::Times_Vector_Primitive< RTYPE , NA , T >
438+
inline sugar::Times_Vector_Primitive< RTYPE , NA , T >
440439
operator*(
441-
typename Rcpp::traits::storage_type<RTYPE>::type rhs,
442-
const Rcpp::VectorBase<RTYPE,NA,T>& lhs
440+
typename traits::storage_type<RTYPE>::type rhs,
441+
const VectorBase<RTYPE,NA,T>& lhs
443442
) {
444-
return Rcpp::sugar::Times_Vector_Primitive<RTYPE,NA, T >( lhs, rhs ) ;
443+
return sugar::Times_Vector_Primitive<RTYPE,NA, T >( lhs, rhs ) ;
445444
}
446445

447446

448447

449448
template <int RTYPE,bool NA, typename T>
450-
inline Rcpp::sugar::Times_Vector_Primitive_nona<RTYPE,NA,T>
449+
inline sugar::Times_Vector_Primitive_nona<RTYPE,NA,T>
451450
operator*(
452-
const Rcpp::VectorBase<RTYPE,NA,T>& lhs,
453-
typename Rcpp::sugar::NonaPrimitive< typename Rcpp::traits::storage_type<RTYPE>::type > rhs
451+
const VectorBase<RTYPE,NA,T>& lhs,
452+
typename sugar::NonaPrimitive< typename traits::storage_type<RTYPE>::type > rhs
454453
) {
455-
return Rcpp::sugar::Times_Vector_Primitive_nona<RTYPE,NA,T>( lhs, rhs ) ;
454+
return sugar::Times_Vector_Primitive_nona<RTYPE,NA,T>( lhs, rhs ) ;
456455
}
457456

458457
template <int RTYPE,bool NA, typename T>
459-
inline Rcpp::sugar::Times_Vector_Primitive_nona< RTYPE , NA , T >
458+
inline sugar::Times_Vector_Primitive_nona< RTYPE , NA , T >
460459
operator*(
461-
typename Rcpp::sugar::NonaPrimitive< typename Rcpp::traits::storage_type<RTYPE>::type > rhs,
462-
const Rcpp::VectorBase<RTYPE,NA,T>& lhs
460+
typename sugar::NonaPrimitive< typename traits::storage_type<RTYPE>::type > rhs,
461+
const VectorBase<RTYPE,NA,T>& lhs
463462
) {
464-
return Rcpp::sugar::Times_Vector_Primitive_nona<RTYPE,NA, T >( lhs, rhs ) ;
463+
return sugar::Times_Vector_Primitive_nona<RTYPE,NA, T >( lhs, rhs ) ;
465464
}
466465

467466

468467
template <int RTYPE,bool LHS_NA, typename LHS_T, bool RHS_NA, typename RHS_T>
469-
inline Rcpp::sugar::Times_Vector_Vector<
468+
inline sugar::Times_Vector_Vector<
470469
RTYPE ,
471470
LHS_NA, LHS_T,
472471
RHS_NA, RHS_T
473472
>
474473
operator*(
475-
const Rcpp::VectorBase<RTYPE,LHS_NA,LHS_T>& lhs,
476-
const Rcpp::VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
474+
const VectorBase<RTYPE,LHS_NA,LHS_T>& lhs,
475+
const VectorBase<RTYPE,RHS_NA,RHS_T>& rhs
477476
) {
478-
return Rcpp::sugar::Times_Vector_Vector<
477+
return sugar::Times_Vector_Vector<
479478
RTYPE,
480479
LHS_NA, LHS_T,
481480
RHS_NA, RHS_T
482481
>( lhs, rhs ) ;
483482
}
484483

484+
}
485+
485486
#endif

0 commit comments

Comments
 (0)