https://github.com/sharpyr/veho
iterable toolset
https://github.com/sharpyr/veho
2d-array array dictionary ienumerable list matrix tuple
Last synced: about 2 months ago
JSON representation
iterable toolset
- Host: GitHub
- URL: https://github.com/sharpyr/veho
- Owner: sharpyr
- License: mit
- Created: 2020-11-14T08:44:23.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-11-29T23:00:36.000Z (6 months ago)
- Last Synced: 2025-02-07T21:38:56.453Z (4 months ago)
- Topics: 2d-array, array, dictionary, ienumerable, list, matrix, tuple
- Language: C#
- Homepage:
- Size: 492 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README

Extend enumerable and array functionalities
[](https://www.nuget.org/packages/Veho)
[](https://www.nuget.org/packages/Veho)
[](https://libraries.io/nuget/Veho)
[](https://dotnet.microsoft.com/learn/csharp)
[]()
[](https://github.com/sharpyr/Veho/LICENSE)## Features
Veho is an extension lib for iterable e.g. array, 2d-array and dictionary.
## Content
| Package | Content |
|-----------------------|---------------------------------------------------|
| `Veho` | The core library, including all Veho sub projects |
| `Veho.Dictionary` | Extend IDictionary |
| `Veho.Entries` | Extend IReadOnlyList<(TK key, TV value)> |
| `Veho.Enumerable` | Extend IEnumerable |
| `Veho.Linear` | Perform basic linear algebra for matrix |
| `Veho.Matrix` | Extend T[,] |
| `Veho.Mutable.Matrix` | Extend IReadOnlyList> |
| `Veho.OneBase` | Extend 1-based (offset) array T[,] |
| `Veho.PanBase` | Extend general (offset) array T[,] |
| `Veho.Sequence` | Extend IReadOnlyList to List |
| `Veho.Tuple` | Extend (T, T), (T, T, T), (T, T, T, T) |
| `Veho.Types` | Base types in Veho series |
| `Veho.Vector` | Extend T[] |## Install
Veho targets .NET Standard 2.0, fits both .NET and .NET Framework.
Install [Veho package](https://www.nuget.org/packages/Veho) and sub packages.
NuGet Package Manager:
```powershell
Install-Package Veho
```.NET CLI:
```shell
dotnet add package Veho
```All versions can be found [on nuget](https://www.nuget.org/packages/Veho#versions-body-tab).
## Usage
### Zip two arrays into an new array
```csharp
using Veho.Vectorvar vecA = new[] {1, 2, 3, 4, 5};
var vecB = new[] {2, 2, 0, 3, 3};
Func func = (x, y) => x * y;
var vecC = func.Zipper(vecA, vecB);
Console.WriteLine(string.Join(", ", vecC));
```### Compute max by reducing an array
```csharp
using Veho.Vector;var vec = Vec.From(1, 4, 6, 3, 2);
var max = vec.Reduce(Math.Max);
Console.WriteLine(max);
```### Push a value into an array
```csharp
using Veho.Vector;
using Spare;var arr = Vec.From("a", "b", "c");
arr.Push("d")
Console.WriteLine(arr.Deco())
```>
# Examples
---------------------
Veho has a test suite in the [test project](https://github.com/sharpyr/Veho/tree/master/Veho.Test/Src).## Feedback
Veho is licensed under the [MIT](https://github.com/sharpyr/Veho/LICENSE) license.
Bug report and contribution are welcome at [the GitHub repository](https://github.com/sharpyr/Veho).