From bd1eee136662ef638628bca9907ae64f1b7538f9 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Sat, 8 Jun 2024 15:28:57 -0400 Subject: [PATCH] Various guide edits --- docs/Contents.md | 7 +++++-- docs/DataTypes.md | 2 +- docs/Transforms.md | 2 +- docs/VectorsMatrices.md | 8 ++------ 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/Contents.md b/docs/Contents.md index f262d0e..a198d89 100644 --- a/docs/Contents.md +++ b/docs/Contents.md @@ -1,10 +1,13 @@ # NumIdr Guide -Welcome to NumIdr's guide! +Welcome to NumIdr's guide! This guide will serve as a basic introduction to the core ideas of NumIdr, as well as a reference for common functions and utilities that you might otherwise miss. If you're familiar with the Python library [NumPy](https://numpy.org/) or anything based on it, then a lot of the early content will be familiar, as NumIdr is based on the same array type. -### Tutorial +> [!NOTE] +> This guide assumes a basic understanding of linear algebra, and it will not explain any linear algebra concepts necessary for understanding NumIdr's structure. + +### Primary Features 1. [Fundamental Data Types](DataTypes.md) 2. [Basic Operations on Arrays](Operations.md) diff --git a/docs/DataTypes.md b/docs/DataTypes.md index 58adf25..f7c4e8b 100644 --- a/docs/DataTypes.md +++ b/docs/DataTypes.md @@ -126,7 +126,7 @@ The `TransType` parameter dictates what kind of transform it is. More informatio ### Permutations -The type `Permutation n` represents a permutation of `n` elements. Permutations are mostly used internally for various algorithms, but they are also an input in various operations, such as those that permute the axes of an array. +The type `Permutation n` represents a permutation of `n` elements. Permutations are mostly used internally for various algorithms, but they are also an input in some operations, such as permuting the rows or columns of a matrix. Permutations can be composed using `(*.)`, and a permutation can be converted into a matrix using `permuteM`. diff --git a/docs/Transforms.md b/docs/Transforms.md index 1b3271c..215a1f5 100644 --- a/docs/Transforms.md +++ b/docs/Transforms.md @@ -76,7 +76,7 @@ There are also direct constructors for transforms, which are often more convenie Like most objects in NumIdr, transforms multiply with the generalized multiplication operator `(*.)`, and `identity` and `inverse` can also be used with transforms. -> [!IMPORTANT] +> [!NOTE] > There is no `tryInverse` function for transforms. This is because all transforms are required to be invertible, so there isn't any need for it; you can safely use `inverse` in all circumstances. Transforms of any types can be multiplied. When two transforms of different types are multiplied, the resulting transform type is determined by taking the most specific type that both original types can be cast to. For example, an `Orthonormal` transform multiplied by a `Translation` returns an `Isometry`. diff --git a/docs/VectorsMatrices.md b/docs/VectorsMatrices.md index 8073d94..b5068b6 100644 --- a/docs/VectorsMatrices.md +++ b/docs/VectorsMatrices.md @@ -4,18 +4,14 @@ As linear algebra is one of the main concerns of NumIdr, most of its provided fu ## The Generalized Multiplication Operator -A linear algebra library wouldn't be very useful without matrix multiplication! Since `(*)` is already used for element-wise multiplication, NumIdr defines a new interface `Mult`: +A linear algebra library wouldn't be very useful without matrix multiplication! Since `(*)` is already used for element-wise multiplication, NumIdr defines a new interface `Mult` that can accept and return values of different types: ```idris interface Mult a b c where (*.) : a -> b -> c - --- Synonym for homogeneous cases: -Mult' : Type -> Type -Mult' a = Mult a a a ``` -The generalized multiplication operator `(*.)` covers matrix multiplication, scalar-vector multiplication, and any other operation that's vaguely multiplication-like. +The generalized multiplication operator `(*.)` covers matrix multiplication, scalar-vector multiplication, and any other linear algebra operation that's vaguely multiplication-like. ## Vectors