示例#1
0
	inline SPROUT_CONSTEXPR sprout::valarray<T, N>
	operator%(sprout::valarray<T, N> const& lhs, sprout::valarray<T, N> const& rhs) {
		return sprout::fixed::transform(lhs.begin(), lhs.end(), rhs.begin(), lhs, sprout::modulus<>());
	}
示例#2
0
	inline SPROUT_CONSTEXPR sprout::valarray<T, N>
	operator*(sprout::valarray<T, N> const& lhs, T const& rhs) {
		return sprout::fixed::transform(lhs.begin(), lhs.end(), lhs, sprout::bind2nd(sprout::multiplies<>(), rhs));
	}
示例#3
0
	inline SPROUT_CONSTEXPR sprout::valarray<T, N>
	operator/(T const& lhs, sprout::valarray<T, N> const& rhs) {
		return sprout::fixed::transform(rhs.begin(), rhs.end(), rhs, sprout::bind1st(sprout::divides<>(), lhs));
	}
示例#4
0
文件: logical.hpp 项目: kundor/Sprout
	inline SPROUT_CONSTEXPR sprout::valarray<bool, N>
	operator||(T const& lhs, sprout::valarray<T, N> const& rhs) {
		typedef sprout::sized_pit<sprout::valarray<bool, N> > sized_pit_type;
		return sprout::fixed::transform(rhs.begin(), rhs.end(), sized_pit_type(rhs.size()), sprout::bind1st(sprout::logical_or<>(), lhs));
	}