Skip to content

Commit 3bced7e

Browse files
committed
Test revert 0verloads
1 parent b96d175 commit 3bced7e

5 files changed

Lines changed: 0 additions & 209 deletions

File tree

stan/math/fwd/core/operator_addition.hpp

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#define STAN_MATH_FWD_CORE_OPERATOR_ADDITION_HPP
33

44
#include <stan/math/fwd/core/fvar.hpp>
5-
#include <stan/math/fwd/core/std_complex.hpp>
6-
#include <stan/math/prim/core/operator_addition.hpp>
75

86
namespace stan {
97
namespace math {
@@ -47,51 +45,6 @@ inline fvar<T> operator+(const fvar<T>& x1, double x2) {
4745
return fvar<T>(x1.val_ + x2, x1.d_);
4846
}
4947

50-
/**
51-
* Return the sum of the two complex fvar<T> arguments.
52-
*
53-
* @tparam value and tangent type for variables
54-
* @param[in] x first argument
55-
* @param[in] y second argument
56-
* @return sum of arguments
57-
*/
58-
template <typename T>
59-
inline std::complex<stan::math::fvar<T>> operator+(
60-
const std::complex<stan::math::fvar<T>>& x,
61-
const std::complex<stan::math::fvar<T>>& y) {
62-
return internal::complex_add(x, y);
63-
}
64-
65-
/**
66-
* Return the sum of std::complex<double> and
67-
* std::complex<fvar<T>> arguments.
68-
*
69-
* @tparam value and tangent type for variables
70-
* @param[in] x first argument
71-
* @param[in] y second argument
72-
* @return sum of arguments
73-
*/
74-
template <typename T>
75-
inline std::complex<stan::math::fvar<T>> operator+(
76-
const std::complex<double>& x, const std::complex<stan::math::fvar<T>>& y) {
77-
return internal::complex_add(x, y);
78-
}
79-
80-
/**
81-
* Return the sum of std::complex<double> and
82-
* std::complex<fvar<T>> arguments.
83-
*
84-
* @tparam value and tangent type for variables
85-
* @param[in] x first argument
86-
* @param[in] y second argument
87-
* @return sum of arguments
88-
*/
89-
template <typename T>
90-
inline std::complex<stan::math::fvar<T>> operator+(
91-
const std::complex<stan::math::fvar<T>>& x, const std::complex<double>& y) {
92-
return internal::complex_add(x, y);
93-
}
94-
9548
} // namespace math
9649
} // namespace stan
9750
#endif

stan/math/fwd/core/operator_subtraction.hpp

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#define STAN_MATH_FWD_CORE_OPERATOR_SUBTRACTION_HPP
33

44
#include <stan/math/fwd/core/fvar.hpp>
5-
#include <stan/math/fwd/core/std_complex.hpp>
6-
#include <stan/math/prim/core/operator_subtraction.hpp>
75

86
namespace stan {
97
namespace math {
@@ -47,51 +45,6 @@ inline fvar<T> operator-(const fvar<T>& x1, double x2) {
4745
return fvar<T>(x1.val_ - x2, x1.d_);
4846
}
4947

50-
/**
51-
* Return the difference of the two complex fvar<T> arguments.
52-
*
53-
* @tparam value and tangent type for variables
54-
* @param[in] x first argument
55-
* @param[in] y second argument
56-
* @return subtraction of arguments
57-
*/
58-
template <typename T>
59-
inline std::complex<stan::math::fvar<T>> operator-(
60-
const std::complex<stan::math::fvar<T>>& x,
61-
const std::complex<stan::math::fvar<T>>& y) {
62-
return internal::complex_subtract(x, y);
63-
}
64-
65-
/**
66-
* Return the difference of std::complex<double> and
67-
* std::complex<fvar<T>> arguments.
68-
*
69-
* @tparam value and tangent type for variables
70-
* @param[in] x first argument
71-
* @param[in] y second argument
72-
* @return subtraction of arguments
73-
*/
74-
template <typename T>
75-
inline std::complex<stan::math::fvar<T>> operator-(
76-
const std::complex<double>& x, const std::complex<stan::math::fvar<T>>& y) {
77-
return internal::complex_subtract(x, y);
78-
}
79-
80-
/**
81-
* Return the difference of std::complex<double> and
82-
* std::complex<fvar<T>> arguments.
83-
*
84-
* @tparam value and tangent type for variables
85-
* @param[in] x first argument
86-
* @param[in] y second argument
87-
* @return subtraction of arguments
88-
*/
89-
template <typename T>
90-
inline std::complex<stan::math::fvar<T>> operator-(
91-
const std::complex<stan::math::fvar<T>>& x, const std::complex<double>& y) {
92-
return internal::complex_subtract(x, y);
93-
}
94-
9548
} // namespace math
9649
} // namespace stan
9750
#endif

stan/math/rev/core/operator_addition.hpp

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33

44
#include <stan/math/rev/meta.hpp>
55
#include <stan/math/rev/core/var.hpp>
6-
#include <stan/math/rev/core/std_complex.hpp>
76
#include <stan/math/prim/err/check_matching_dims.hpp>
87
#include <stan/math/rev/core/callback_vari.hpp>
98
#include <stan/math/prim/fun/as_column_vector_or_scalar.hpp>
109
#include <stan/math/prim/fun/as_array_or_scalar.hpp>
1110
#include <stan/math/prim/fun/constants.hpp>
12-
#include <stan/math/prim/core/operator_addition.hpp>
1311

1412
namespace stan {
1513
namespace math {
@@ -280,45 +278,6 @@ inline auto operator+(const VarMat1& a, const VarMat2& b) {
280278
return add(a, b);
281279
}
282280

283-
/**
284-
* Return the sum of std::complex<var> arguments.
285-
*
286-
* @param[in] x first argument
287-
* @param[in] y second argument
288-
* @return sum of arguments
289-
*/
290-
inline std::complex<stan::math::var> operator+(
291-
const std::complex<stan::math::var>& x,
292-
const std::complex<stan::math::var>& y) {
293-
return internal::complex_add(x, y);
294-
}
295-
296-
/**
297-
* Return the sum of std::complex<double> and
298-
* std::complex<var> arguments.
299-
*
300-
* @param[in] x first argument
301-
* @param[in] y second argument
302-
* @return sum of arguments
303-
*/
304-
inline std::complex<stan::math::var> operator+(
305-
const std::complex<double>& x, const std::complex<stan::math::var>& y) {
306-
return internal::complex_add(x, y);
307-
}
308-
309-
/**
310-
* Return the sum of std::complex<double> and
311-
* std::complex<var> arguments.
312-
*
313-
* @param[in] x first argument
314-
* @param[in] y second argument
315-
* @return sum of arguments
316-
*/
317-
inline std::complex<stan::math::var> operator+(
318-
const std::complex<stan::math::var>& x, const std::complex<double>& y) {
319-
return internal::complex_add(x, y);
320-
}
321-
322281
} // namespace math
323282
} // namespace stan
324283
#endif

stan/math/rev/core/operator_division.hpp

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -256,44 +256,11 @@ inline auto operator/(const T1& dividend, const T2& divisor) {
256256
return divide(dividend, divisor);
257257
}
258258

259-
/**
260-
* Return the division of std::complex<var> arguments.
261-
*
262-
* @param[in] x first argument
263-
* @param[in] y second argument
264-
* @return division of arguments
265-
*/
266259
inline std::complex<var> operator/(const std::complex<var>& x1,
267260
const std::complex<var>& x2) {
268261
return internal::complex_divide(x1, x2);
269262
}
270263

271-
/**
272-
* Return the division of std::complex<double> and
273-
* std::complex<var> arguments.
274-
*
275-
* @param[in] x first argument
276-
* @param[in] y second argument
277-
* @return division of arguments
278-
*/
279-
inline std::complex<var> operator/(const std::complex<double>& x1,
280-
const std::complex<var>& x2) {
281-
return internal::complex_divide(x1, x2);
282-
}
283-
284-
/**
285-
* Return the division of std::complex<double> and
286-
* std::complex<var> arguments.
287-
*
288-
* @param[in] x first argument
289-
* @param[in] y second argument
290-
* @return division of arguments
291-
*/
292-
inline std::complex<var> operator/(const std::complex<var>& x1,
293-
const std::complex<double>& x2) {
294-
return internal::complex_divide(x1, x2);
295-
}
296-
297264
} // namespace math
298265
} // namespace stan
299266
#endif

stan/math/rev/core/operator_subtraction.hpp

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33

44
#include <stan/math/rev/meta.hpp>
55
#include <stan/math/rev/core/var.hpp>
6-
#include <stan/math/rev/core/std_complex.hpp>
76
#include <stan/math/rev/core/arena_matrix.hpp>
87
#include <stan/math/rev/core/callback_vari.hpp>
98
#include <stan/math/prim/fun/as_column_vector_or_scalar.hpp>
109
#include <stan/math/prim/fun/as_array_or_scalar.hpp>
1110
#include <stan/math/prim/fun/constants.hpp>
1211
#include <stan/math/prim/fun/is_any_nan.hpp>
13-
#include <stan/math/prim/core/operator_subtraction.hpp>
1412

1513
namespace stan {
1614
namespace math {
@@ -312,45 +310,6 @@ inline auto operator-(const VarMat1& a, const VarMat2& b) {
312310
return subtract(a, b);
313311
}
314312

315-
/**
316-
* Return the difference of std::complex<var> arguments.
317-
*
318-
* @param[in] x first argument
319-
* @param[in] y second argument
320-
* @return subtraction of arguments
321-
*/
322-
inline std::complex<stan::math::var> operator-(
323-
const std::complex<stan::math::var>& x,
324-
const std::complex<stan::math::var>& y) {
325-
return internal::complex_subtract(x, y);
326-
}
327-
328-
/**
329-
* Return the difference of std::complex<double> and
330-
* std::complex<var> arguments.
331-
*
332-
* @param[in] x first argument
333-
* @param[in] y second argument
334-
* @return subtraction of arguments
335-
*/
336-
inline std::complex<stan::math::var> operator-(
337-
const std::complex<double>& x, const std::complex<stan::math::var>& y) {
338-
return internal::complex_subtract(x, y);
339-
}
340-
341-
/**
342-
* Return the difference of std::complex<double> and
343-
* std::complex<var> arguments.
344-
*
345-
* @param[in] x first argument
346-
* @param[in] y second argument
347-
* @return subtraction of arguments
348-
*/
349-
inline std::complex<stan::math::var> operator-(
350-
const std::complex<stan::math::var>& x, const std::complex<double>& y) {
351-
return internal::complex_subtract(x, y);
352-
}
353-
354313
} // namespace math
355314
} // namespace stan
356315
#endif

0 commit comments

Comments
 (0)