ndarray-vector-uint16
Create an unsigned 16-bit integer vector (i.e., a one-dimensional ndarray).
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 (17.4%) to scientific vocabulary
Keywords
Repository
Create an unsigned 16-bit integer vector (i.e., a one-dimensional ndarray).
Basic Info
- Host: GitHub
- Owner: Eurent
- 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
Metadata Files
README.md
🛠️ ndarray-vector-uint16
Welcome to the ndarray-vector-uint16 repository! This project allows you to create an unsigned 16-bit integer vector, also known as a one-dimensional ndarray. This tool is particularly useful for handling numerical data in various applications, especially in the fields of data science, machine learning, and numerical analysis.
Table of Contents
Introduction
The ndarray-vector-uint16 library provides a simple way to work with unsigned 16-bit integers in a vector format. This is particularly important for applications that require efficient memory usage and high performance when processing large datasets. By using this library, you can easily create, manipulate, and perform operations on vectors of unsigned 16-bit integers.
To get started, you can download the latest release from our Releases section.
Features
- Easy to Use: The API is designed for simplicity, making it easy for developers of all skill levels to integrate it into their projects.
- Efficient Memory Management: Designed to minimize memory usage while maximizing performance.
- Comprehensive API: Supports various operations on vectors, including addition, subtraction, and more.
- Cross-Platform Compatibility: Works seamlessly on different platforms, including Node.js and browsers.
Installation
To install the ndarray-vector-uint16 library, follow these steps:
- Ensure you have Node.js installed on your machine.
- Use npm to install the library:
bash
npm install ndarray-vector-uint16
- After installation, you can start using the library in your JavaScript projects.
For the latest version, visit our Releases section.
Usage
Here’s a quick example of how to create an unsigned 16-bit integer vector using this library:
```javascript const { Vector } = require('ndarray-vector-uint16');
// Create a new vector with a length of 5 const vec = new Vector(5);
// Set values vec.set(0, 100); vec.set(1, 200); vec.set(2, 300); vec.set(3, 400); vec.set(4, 500);
// Get values console.log(vec.get(0)); // Output: 100 console.log(vec.get(1)); // Output: 200 ```
API Reference
Vector Class
Constructor
javascript
Vector(length: number)
- length: The length of the vector.
Methods
- set(index: number, value: number): Sets the value at the specified index.
- get(index: number): Retrieves the value at the specified index.
- length(): Returns the length of the vector.
- add(vector: Vector): Adds another vector to this vector.
- subtract(vector: Vector): Subtracts another vector from this vector.
Examples
Creating a Vector
javascript
const vec = new Vector(10);
Setting Values
javascript
vec.set(0, 100);
vec.set(1, 200);
Retrieving Values
javascript
console.log(vec.get(0)); // 100
console.log(vec.get(1)); // 200
Adding Two Vectors
```javascript const vec1 = new Vector(3); const vec2 = new Vector(3);
vec1.set(0, 1); vec1.set(1, 2); vec1.set(2, 3);
vec2.set(0, 4); vec2.set(1, 5); vec2.set(2, 6);
const result = vec1.add(vec2); console.log(result); // Should output a new vector with values [5, 7, 9] ```
Contributing
We welcome contributions to the ndarray-vector-uint16 project. If you want to help out, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature). - Make your changes.
- Commit your changes (
git commit -m 'Add new feature'). - Push to the branch (
git push origin feature/YourFeature). - Create a new Pull Request.
Please ensure that your code follows our coding standards and includes tests where applicable.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Contact
For questions or feedback, feel free to reach out:
- Email: yourname@example.com
- GitHub: Eurent
Thank you for your interest in ndarray-vector-uint16! For more updates and the latest releases, check out our Releases section.
Owner
- Login: Eurent
- Kind: user
- Repositories: 1
- Profile: https://github.com/Eurent
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: 392
- Create event: 2
Last Year
- Push event: 392
- Create event: 2
Dependencies
- @stdlib/array-buffer ^0.2.2 development
- @stdlib/array-float64 ^0.2.2 development
- @stdlib/array-uint16 ^0.2.2 development
- @stdlib/assert-is-equal-uint16array github:stdlib-js/assert-is-equal-uint16array#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