dotproduct Function

private elemental function dotproduct(lhs, rhs) result(dot)

Compute the scalar (dot) product.

where , and are the components of the vectors.

 type(vector) :: pt(1:2)
 pt(1) = ex
 pt(2) = ey
 print "(F3.1)", pt(1).dot.pt(2)

Arguments

TypeIntentOptionalAttributesName
class(vector), intent(in) :: lhs

Left hand side.

type(vector), intent(in) :: rhs

Right hand side.

Return Value real(kind=R8P)

Dot product.


Contents

None