Add Debug trait to Outer trait
This commit is contained in:
parent
0f24c2d8fc
commit
73158ddad1
|
@ -19,6 +19,7 @@ use traits::geometry::{ToHomogeneous, FromHomogeneous, Orig};
|
||||||
use linalg;
|
use linalg;
|
||||||
#[cfg(feature="arbitrary")]
|
#[cfg(feature="arbitrary")]
|
||||||
use quickcheck::{Arbitrary, Gen};
|
use quickcheck::{Arbitrary, Gen};
|
||||||
|
use std::fmt::Debug;
|
||||||
|
|
||||||
|
|
||||||
/// Special identity matrix. All its operation are no-ops.
|
/// Special identity matrix. All its operation are no-ops.
|
||||||
|
|
|
@ -702,7 +702,7 @@ macro_rules! from_homogeneous_impl(
|
||||||
|
|
||||||
macro_rules! outer_impl(
|
macro_rules! outer_impl(
|
||||||
($t: ident, $m: ident) => (
|
($t: ident, $m: ident) => (
|
||||||
impl<N: Copy + Mul<N, Output = N> + Zero> Outer for $t<N> {
|
impl<N: Copy + Debug + Mul<N, Output = N> + Zero> Outer for $t<N> {
|
||||||
type OuterProductType = $m<N>;
|
type OuterProductType = $m<N>;
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
|
@ -4,6 +4,7 @@ use num::{Float, Signed};
|
||||||
use std::ops::Mul;
|
use std::ops::Mul;
|
||||||
use std::cmp::Ordering;
|
use std::cmp::Ordering;
|
||||||
use traits::structure::SquareMat;
|
use traits::structure::SquareMat;
|
||||||
|
use std::fmt::Debug;
|
||||||
|
|
||||||
/// Result of a partial ordering.
|
/// Result of a partial ordering.
|
||||||
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Debug, Copy)]
|
#[derive(Eq, PartialEq, RustcEncodable, RustcDecodable, Clone, Debug, Copy)]
|
||||||
|
@ -300,9 +301,9 @@ pub trait Transpose {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Traits of objects having an outer product.
|
/// Traits of objects having an outer product.
|
||||||
pub trait Outer {
|
pub trait Outer : Debug {
|
||||||
/// Result type of the outer product.
|
/// Result type of the outer product.
|
||||||
type OuterProductType;
|
type OuterProductType : Debug;
|
||||||
|
|
||||||
/// Computes the outer product: `a * b`
|
/// Computes the outer product: `a * b`
|
||||||
fn outer(&self, other: &Self) -> Self::OuterProductType;
|
fn outer(&self, other: &Self) -> Self::OuterProductType;
|
||||||
|
|
Loading…
Reference in New Issue