mirror of
https://github.com/SinTan1729/matrix-basic.git
synced 2024-12-26 05:48:36 -06:00
docs: Add more links in docs
This commit is contained in:
parent
f49060fe44
commit
5ac1e60597
1 changed files with 5 additions and 5 deletions
10
src/lib.rs
10
src/lib.rs
|
@ -31,7 +31,7 @@ pub trait ToMatrix:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Blanket implementation for ToMatrix for any type that satisfies its bounds.
|
/// Blanket implementation for [`ToMatrix`] for any type that satisfies its bounds.
|
||||||
impl<T> ToMatrix for T where
|
impl<T> ToMatrix for T where
|
||||||
T: Mul<Output = T>
|
T: Mul<Output = T>
|
||||||
+ Add<Output = T>
|
+ Add<Output = T>
|
||||||
|
@ -482,12 +482,12 @@ impl<T: ToMatrix> Sub for Matrix<T> {
|
||||||
/// of specialization system is implemented.
|
/// of specialization system is implemented.
|
||||||
/// You can track this issue [here](https://github.com/rust-lang/rust/issues/42721).
|
/// You can track this issue [here](https://github.com/rust-lang/rust/issues/42721).
|
||||||
pub trait MatrixInto<T: ToMatrix> {
|
pub trait MatrixInto<T: ToMatrix> {
|
||||||
/// Method for converting a matrix into a matrix of type `Matrix<T>`
|
/// Method for converting a matrix into a matrix of type [`Matrix<T>`]
|
||||||
fn matrix_into(self) -> Matrix<T>;
|
fn matrix_into(self) -> Matrix<T>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Blanket implementation of MatrixInto for converting `Matrix<S>` to `Matrix<T>` whenever
|
/// Blanket implementation of [`MatrixInto`] for converting [`Matrix<S>`] to [`Matrix<T>`] whenever
|
||||||
/// `S` implements `Into<T>`.
|
/// `T` implements [`From(S)`].
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```
|
/// ```
|
||||||
/// use matrix_basic::Matrix;
|
/// use matrix_basic::Matrix;
|
||||||
|
@ -499,7 +499,7 @@ pub trait MatrixInto<T: ToMatrix> {
|
||||||
///
|
///
|
||||||
/// assert_eq!(c, b);
|
/// assert_eq!(c, b);
|
||||||
/// ```
|
/// ```
|
||||||
impl<T: ToMatrix, S: ToMatrix + Into<T>> MatrixInto<T> for Matrix<S> {
|
impl<T: ToMatrix + From<S>, S: ToMatrix> MatrixInto<T> for Matrix<S> {
|
||||||
fn matrix_into(self) -> Matrix<T> {
|
fn matrix_into(self) -> Matrix<T> {
|
||||||
let mut out = Vec::new();
|
let mut out = Vec::new();
|
||||||
for row in self.entries {
|
for row in self.entries {
|
||||||
|
|
Loading…
Reference in a new issue