ndim/
lib.rs

1// MIT License
2
3// Copyright (c) 2024 Abhishek
4
5// Permission is hereby granted, free of charge, to any person obtaining a copy
6// of this software and associated documentation files (the "Software"), to deal
7// in the Software without restriction, including without limitation the rights
8// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9// copies of the Software, and to permit persons to whom the Software is
10// furnished to do so, subject to the following conditions:
11
12// The above copyright notice and this permission notice shall be included in all
13// copies or substantial portions of the Software.
14
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21// SOFTWARE.
22
23//! # Description
24//! NDim is an open-source Rust library for n-dimensional array storage, similar to NumPy in Python and ndarray in Rust. It aims to assist in scientific computation by providing efficient and flexible n-dimensional array data structures and operations. The library is designed to be performant and easy to use, making it an excellent choice for high-performance computing tasks in Rust.
25//!
26//! **Note:** This project is still under development, and contributions are welcome!
27//!
28//! ## Features
29//! - **N-Dimensional Array Storage:** Efficient storage and manipulation of n-dimensional arrays.
30//! - **Generic Data Types:** Supports various numeric types, including integers and floating-point numbers.
31//! **Basic Array Operations:** Provides basic operations such as array creation, indexing, and element-wise operations.
32//!
33//! ## Upcoming Features
34//!
35//! - **Fancy printing:** Print the n-dimensional array conforming to its shape.
36//! - **Axes mutation:** Change values of the n-dimensional array in an axis and much more with axes.
37//! - **Mapping and other looping support:** Loop over the n-dimensional array by using (viz.) map, reduce, filter, etc. methods.
38//! - **BLAS Support:** Integration with Basic Linear Algebra Subprograms (BLAS) for advanced linear algebra operations.
39//!
40//! ## Installation
41//!
42//! Add the following to your `Cargo.toml`:
43//!
44//! ```toml
45//! [dependencies]
46//! ndim = { git = "https://github.com/noobsiecoder/ndim.git" }
47//! ```
48//!
49//! ## Usage
50//!
51//! Here's a simple example of how to use `NDim`:
52//!
53//! ```rust
54//! use ndim::core::NdArray;
55//!
56//! fn main() {
57//!     // Create an NdArray filled with a specific value
58//!     let shape = [3, 2];
59//!     let array = NdArray::<i32, 2>::zeros(shape);
60//!
61//!     // Print the array
62//!     for i in 0..array.shape()[0] {
63//!         for j in 0..array.shape()[1] {
64//!             println!("{}", array[[i, j]]); // access the value from memory
65//!         }
66//!     }
67//! }
68//! ```
69
70/// Contains **core API to create N-dimensional** array and also helps in manipulating the values in its corresponding memory address.
71///
72/// View [here](https://github.com/noobsiecoder/ndim) to know more about the available API
73pub mod core;