Skip to content

elTREX22/array-base-symmetric-banded

Array Base Symmetric Banded ๐ŸŒŸ

Welcome to the Array Base Symmetric Banded repository! This project provides utilities for working with symmetric banded arrays in JavaScript. These utilities simplify matrix operations, making it easier to manage and manipulate data structures in your applications.

Table of Contents

Features

  • Compact Storage: Efficiently store symmetric banded matrices.
  • Utility Functions: A range of functions to manipulate and operate on arrays.
  • Node.js Compatibility: Works seamlessly in Node.js environments.
  • Namespace Support: Organize your utilities under a clear namespace.
  • Easy Integration: Simple to integrate into existing projects.

Installation

To install the package, use npm:

npm install array-base-symmetric-banded

Usage

To use the utilities, import the package into your JavaScript file:

const symmetricBanded = require('array-base-symmetric-banded');

// Example of creating a symmetric banded array
const matrix = symmetricBanded.create(5, 2); // Create a 5x5 matrix with a bandwidth of 2

API Documentation

create(rows, bandwidth)

Creates a symmetric banded array.

  • Parameters:

    • rows: Number of rows in the matrix.
    • bandwidth: Number of non-zero diagonals.
  • Returns: A symmetric banded array.

get(matrix, row, col)

Retrieves the value at the specified position.

  • Parameters:

    • matrix: The symmetric banded array.
    • row: Row index.
    • col: Column index.
  • Returns: The value at the specified position.

set(matrix, row, col, value)

Sets the value at the specified position.

  • Parameters:
    • matrix: The symmetric banded array.
    • row: Row index.
    • col: Column index.
    • value: The value to set.

Examples

Creating a Symmetric Banded Matrix

const matrix = symmetricBanded.create(5, 2);
console.log(matrix);

Setting Values

symmetricBanded.set(matrix, 0, 1, 10);
console.log(symmetricBanded.get(matrix, 0, 1)); // Outputs: 10

Getting Values

const value = symmetricBanded.get(matrix, 0, 1);
console.log(value);

Contributing

We welcome contributions! If you have suggestions or improvements, please fork the repository and submit a pull request. Ensure your code follows the existing style and includes tests.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Releases

For the latest releases, visit our Releases page. You can download the latest version and execute it in your projects.

Releases

Additional Resources

For more information, check the Releases section to find detailed notes on updates and changes.

Conclusion

Thank you for checking out the Array Base Symmetric Banded repository. We hope you find these utilities helpful for your projects. Happy coding!