ndarray-vector-uint32

Create an unsigned 32-bit integer vector (i.e., a one-dimensional ndarray).

https://github.com/warningvirus/ndarray-vector-uint32

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.3%) to scientific vocabulary

Keywords

constructor ctor data javascript ndarray nodejs stdlib structure types uint32 vec vector
Last synced: 6 months ago · JSON representation ·

Repository

Create an unsigned 32-bit integer vector (i.e., a one-dimensional ndarray).

Basic Info
  • Host: GitHub
  • Owner: Warningvirus
  • License: apache-2.0
  • Language: JavaScript
  • Default Branch: main
  • Size: 50.8 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
constructor ctor data javascript ndarray nodejs stdlib structure types uint32 vec vector
Created 9 months ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Security

README.md

ndarray-vector-uint32

Version License npm

Welcome to the ndarray-vector-uint32 repository! This project provides a straightforward way to create an unsigned 32-bit integer vector, also known as a one-dimensional ndarray. This guide will help you understand how to use this library, its features, and how to contribute.

Table of Contents

Introduction

The ndarray-vector-uint32 library allows developers to work with unsigned 32-bit integer vectors in JavaScript. This is particularly useful for applications that require efficient numerical computations, such as data analysis, scientific computing, and machine learning. The library leverages the power of ndarrays to provide a simple and efficient interface for managing vectors.

Installation

To install the library, you can use npm. Run the following command in your terminal:

bash npm install ndarray-vector-uint32

This will download the library and add it to your project's dependencies.

Usage

After installation, you can easily create and manipulate unsigned 32-bit integer vectors. Here’s a simple example to get you started:

```javascript const createVector = require('ndarray-vector-uint32');

// Create a vector with initial values const vec = createVector([1, 2, 3, 4, 5]);

// Access elements console.log(vec.get(0)); // Output: 1

// Set elements vec.set(0, 10); console.log(vec.get(0)); // Output: 10 ```

Basic Operations

The library supports various operations on the vector. Here are a few common ones:

  • Get an element: Use the get(index) method to retrieve an element at a specific index.
  • Set an element: Use the set(index, value) method to update an element.
  • Length: Use the length property to get the number of elements in the vector.

Features

  • Simple API: The library provides an easy-to-use interface for creating and manipulating unsigned 32-bit integer vectors.
  • Performance: Built for speed, it is optimized for numerical computations.
  • Compatibility: Works seamlessly with Node.js and modern JavaScript environments.

API Reference

createVector(array)

  • Parameters:
    • array: An array of unsigned 32-bit integers to initialize the vector.
  • Returns: A new vector instance.

vec.get(index)

  • Parameters:
    • index: The index of the element to retrieve.
  • Returns: The value at the specified index.

vec.set(index, value)

  • Parameters:
    • index: The index of the element to update.
    • value: The new value to set.
  • Returns: None.

vec.length

  • Returns: The number of elements in the vector.

Contributing

We welcome contributions to improve the library! If you want to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and commit them with clear messages.
  4. Push your branch to your forked repository.
  5. Open a pull request.

Please ensure your code follows the project's coding style and includes tests where applicable.

License

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

Releases

For the latest releases, visit the Releases section. You can download the latest version and execute it in your project.

To keep your project up to date, check the Releases section regularly.

Acknowledgments

  • Special thanks to the contributors who have helped improve this project.
  • Thanks to the community for providing feedback and support.

Conclusion

The ndarray-vector-uint32 library is a powerful tool for anyone needing to work with unsigned 32-bit integer vectors in JavaScript. Its simple API and efficient performance make it an excellent choice for various applications. We encourage you to explore its features and contribute to its development.

Owner

  • Login: Warningvirus
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
title: stdlib
message: >-
  If you use this software, please cite it using the
  metadata from this file.

type: software

authors:
  - name: The Stdlib Authors
    url: https://github.com/stdlib-js/stdlib/graphs/contributors

repository-code: https://github.com/stdlib-js/stdlib
url: https://stdlib.io

abstract: |
  Standard library for JavaScript and Node.js.

keywords:
  - JavaScript
  - Node.js
  - TypeScript
  - standard library
  - scientific computing
  - numerical computing
  - statistical computing

license: Apache-2.0 AND BSL-1.0

date-released: 2016

GitHub Events

Total
  • Push event: 385
  • Create event: 2
Last Year
  • Push event: 385
  • Create event: 2

Dependencies

package.json npm
  • @stdlib/array-buffer ^0.2.2 development
  • @stdlib/array-float64 ^0.2.2 development
  • @stdlib/array-uint32 ^0.2.2 development
  • @stdlib/assert-is-equal-uint32array github:stdlib-js/assert-is-equal-uint32array#main development
  • @stdlib/assert-is-ndarray-like ^0.2.2 development
  • @stdlib/assert-is-ndarray-like-with-data-type github:stdlib-js/assert-is-ndarray-like-with-data-type#main development
  • @stdlib/bench-harness ^0.2.2 development
  • @stdlib/blas-ext-sum github:stdlib-js/blas-ext-sum#main development
  • @stdlib/buffer-from-array ^0.2.2 development
  • @stdlib/math-base-special-pow ^0.3.0 development
  • @stdlib/ndarray-base-assert-is-read-only ^0.2.2 development
  • @stdlib/ndarray-data-buffer ^0.2.2 development
  • @stdlib/ndarray-map github:stdlib-js/ndarray-map#main development
  • @stdlib/random-array-discrete-uniform ^0.2.1 development
  • istanbul ^0.4.1 development
  • tap-min git+https://github.com/Planeshifter/tap-min.git development
  • tape git+https://github.com/kgryte/tape.git#fix/globby development
  • @stdlib/ndarray-vector-ctor github:stdlib-js/ndarray-vector-ctor#main
  • @stdlib/types ^0.4.3