[Rcpp-commits] r4145 - in pkg/Rcpp: . inst inst/include/Rcpp src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Dec 11 12:44:22 CET 2012
Author: romain
Date: 2012-12-11 12:44:22 +0100 (Tue, 11 Dec 2012)
New Revision: 4145
Modified:
pkg/Rcpp/ChangeLog
pkg/Rcpp/inst/NEWS.Rd
pkg/Rcpp/inst/include/Rcpp/complex.h
pkg/Rcpp/src/api.cpp
Log:
operator==(Rcomplex, Rcomplex)
Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog 2012-12-11 08:25:19 UTC (rev 4144)
+++ pkg/Rcpp/ChangeLog 2012-12-11 11:44:22 UTC (rev 4145)
@@ -4,6 +4,8 @@
* include/Rcpp/sugar/functions/strings/strings.h : string sugar functions
* include/Rcpp/sugar/functions/strings/collapse.h : collapse function,
implementing paste( . , collapse = "" )
+ * include/Rcpp/complex.h: operator==( Rcomplex, Rcomplex )
+ * src/api.cpp: implementation of operator==(Rcomplex, Rcomplex)
2012-12-10 JJ Allaire <jj at rstudio.org>
Modified: pkg/Rcpp/inst/NEWS.Rd
===================================================================
--- pkg/Rcpp/inst/NEWS.Rd 2012-12-11 08:25:19 UTC (rev 4144)
+++ pkg/Rcpp/inst/NEWS.Rd 2012-12-11 11:44:22 UTC (rev 4145)
@@ -14,6 +14,7 @@
element of a character vector
\item utility class sugar::IndexHash inspired from Simon Urbanek's fastmatch
package
+ \item Implementation of the equality operator between two Rcomplex
}
\item Changes in Rcpp sugar:
\itemize{
Modified: pkg/Rcpp/inst/include/Rcpp/complex.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/complex.h 2012-12-11 08:25:19 UTC (rev 4144)
+++ pkg/Rcpp/inst/include/Rcpp/complex.h 2012-12-11 11:44:22 UTC (rev 4145)
@@ -26,5 +26,6 @@
Rcomplex operator+( const Rcomplex& lhs, const Rcomplex& rhs) ;
Rcomplex operator-( const Rcomplex& lhs, const Rcomplex& rhs) ;
Rcomplex operator/( const Rcomplex& a, const Rcomplex& b) ;
+bool operator==( const Rcomplex& a, const Rcomplex& b) ;
#endif
Modified: pkg/Rcpp/src/api.cpp
===================================================================
--- pkg/Rcpp/src/api.cpp 2012-12-11 08:25:19 UTC (rev 4144)
+++ pkg/Rcpp/src/api.cpp 2012-12-11 11:44:22 UTC (rev 4145)
@@ -1148,6 +1148,9 @@
}
return c ;
}
+bool operator==( const Rcomplex& a, const Rcomplex& b){
+ return a.r == b.r && a.i == b.i ;
+}
// }}}
// {{{ utilities (from RcppCommon.cpp)
More information about the Rcpp-commits
mailing list