Skip to content

Instantly share code, notes, and snippets.

Avatar
🐱

Kevin Donahue nonnontrivial

🐱
View GitHub Profile
View are_orthogonal_vectors.rs
use ndarray::*;
use ndarray_linalg::Scalar;
use std::error::Error;
/// determines if the dot product of two vectors is zero
fn are_orthogonal_vectors<A, S>(a: &ArrayBase<S, Ix1>, b: &ArrayBase<S, Ix1>) -> bool
where
A: Scalar,
S: Data<Elem = A>,
{