Skip to content

Commit ae60f4f

Browse files
committed
Use documentation aliases to make the nalgebra support easier to discover.
1 parent 6499cca commit ae60f4f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/array.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,7 @@ where
11061106
/// # Safety
11071107
///
11081108
/// The existence of an exclusive reference to the internal data, e.g. `&mut [T]` or `ArrayViewMut`, implies undefined behavior.
1109+
#[doc(alias = "nalgebra")]
11091110
pub unsafe fn try_as_matrix<R, C, RStride, CStride>(
11101111
&self,
11111112
) -> Option<nalgebra::MatrixSlice<N, R, C, RStride, CStride>>
@@ -1127,6 +1128,7 @@ where
11271128
/// # Safety
11281129
///
11291130
/// The existence of another reference to the internal data, e.g. `&[T]` or `ArrayView`, implies undefined behavior.
1131+
#[doc(alias = "nalgebra")]
11301132
pub unsafe fn try_as_matrix_mut<R, C, RStride, CStride>(
11311133
&self,
11321134
) -> Option<nalgebra::MatrixSliceMut<N, R, C, RStride, CStride>>

src/borrow.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ where
481481
D: Dimension,
482482
{
483483
/// Try to convert this array into a [`nalgebra::MatrixSlice`] using the given shape and strides.
484+
#[doc(alias = "nalgebra")]
484485
pub fn try_as_matrix<R, C, RStride, CStride>(
485486
&self,
486487
) -> Option<nalgebra::MatrixSlice<N, R, C, RStride, CStride>>
@@ -504,6 +505,7 @@ where
504505
/// # Panics
505506
///
506507
/// Panics if the array has negative strides.
508+
#[doc(alias = "nalgebra")]
507509
pub fn as_matrix(&self) -> nalgebra::DMatrixSlice<N, nalgebra::Dynamic, nalgebra::Dynamic> {
508510
self.try_as_matrix().unwrap()
509511
}
@@ -519,6 +521,7 @@ where
519521
/// # Panics
520522
///
521523
/// Panics if the array has negative strides.
524+
#[doc(alias = "nalgebra")]
522525
pub fn as_matrix(&self) -> nalgebra::DMatrixSlice<N, nalgebra::Dynamic, nalgebra::Dynamic> {
523526
self.try_as_matrix().unwrap()
524527
}
@@ -679,6 +682,7 @@ where
679682
D: Dimension,
680683
{
681684
/// Try to convert this array into a [`nalgebra::MatrixSliceMut`] using the given shape and strides.
685+
#[doc(alias = "nalgebra")]
682686
pub fn try_as_matrix_mut<R, C, RStride, CStride>(
683687
&self,
684688
) -> Option<nalgebra::MatrixSliceMut<N, R, C, RStride, CStride>>
@@ -702,6 +706,7 @@ where
702706
/// # Panics
703707
///
704708
/// Panics if the array has negative strides.
709+
#[doc(alias = "nalgebra")]
705710
pub fn as_matrix_mut(
706711
&self,
707712
) -> nalgebra::DMatrixSliceMut<N, nalgebra::Dynamic, nalgebra::Dynamic> {
@@ -719,6 +724,7 @@ where
719724
/// # Panics
720725
///
721726
/// Panics if the array has negative strides.
727+
#[doc(alias = "nalgebra")]
722728
pub fn as_matrix_mut(
723729
&self,
724730
) -> nalgebra::DMatrixSliceMut<N, nalgebra::Dynamic, nalgebra::Dynamic> {

0 commit comments

Comments
 (0)