![]() |
Home | Libraries | People | FAQ | More |
template<class SinglePassRange1, class SinglePassRange2, class Value> Value inner_product( const SinglePassRange1& rng1, const SinglePassRange2& rng2, Value init ); template<class SinglePassRange1, class SinglePassRange2, class Value, class BinaryOperation1, class BinaryOperation2> Value inner_product( const SinglePassRange1& rng1, const SinglePassRange2& rng2, Value init, BinaryOperation1 op1 );
inner_product calculates
a generalised inner product of the range rng1
and rng2.
For further information on the inner_product
algorithm please see inner_product.
Defined in the header file boost/range/numeric.hpp
SinglePassRange1
is a model of the Single
Pass Range Concept.
SinglePassRange2
is a model of the Single
Pass Range Concept.
Value is a model
of the AssignableConcept.
x is an object
of type Value, y is an object of SinglePassRange1's value type,
and z is an object
of SinglePassRange2's
value type, then x + y * z
is defined.
x
+ y
* z
is convertible to Value.
SinglePassRange1
is a model of the Single
Pass Range Concept.
SinglePassRange2
is a model of the Single
Pass Range Concept.
Value is a model
of the AssignableConcept.
BinaryOperation1
is a model of the BinaryFunctionConcept.
BinaryOperation2
is a model of the BinaryFunctionConcept.
SinglePassRange1
is convertible to the first argument type of BinaryOperation2.
SinglePassRange2
is convertible to the second argument type of BinaryOperation2.
Value is convertible
to the value type of BinaryOperation1.
BinaryOperation2
is convertible to the second argument type of BinaryOperation1.
BinaryOperation1
is convertible to Value.
distance(rng2) >= distance(rng1) is a valid range.
Linear. Exactly distance(rng).