> For the complete documentation index, see [llms.txt](https://senselab.gitbook.io/senselab-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://senselab.gitbook.io/senselab-docs/vendor/sanmai/pipeline/docs/reference/method-index.md).

# Method Index

This index provides a quick reference to all methods and helper functions in the Pipeline library.

## Creation

| Method           | Description                                            |
| ---------------- | ------------------------------------------------------ |
| `new Standard()` | Creates a new pipeline instance.                       |
| `take()`         | Creates a pipeline from one or more iterables.         |
| `fromArray()`    | Creates a pipeline from an array.                      |
| `fromValues()`   | Creates a pipeline from individual values.             |
| `map()`          | Creates a pipeline from a generator function.          |
| `zip()`          | Combines multiple iterables into a pipeline of tuples. |

## Transformation

| Method      | Description                                          |
| ----------- | ---------------------------------------------------- |
| `map()`     | Transforms elements, with support for generators.    |
| `cast()`    | Transforms elements on a 1-to-1 basis.               |
| `flatten()` | Flattens a nested pipeline by one level.             |
| `unpack()`  | Unpacks array elements as arguments to a callback.   |
| `chunk()`   | Splits the pipeline into chunks of a specified size. |
| `slice()`   | Extracts a portion of the pipeline.                  |

## Filtering

| Method        | Description                                        |
| ------------- | -------------------------------------------------- |
| `filter()`    | Filters elements based on a condition.             |
| `skipWhile()` | Skips elements from the beginning of the pipeline. |

## Aggregation

| Method     | Description                                         |
| ---------- | --------------------------------------------------- |
| `reduce()` | Reduces the pipeline to a single value.             |
| `fold()`   | Reduces the pipeline with a required initial value. |
| `count()`  | Counts the number of elements.                      |
| `min()`    | Finds the minimum value.                            |
| `max()`    | Finds the maximum value.                            |

## Collection

| Method          | Description                                           |
| --------------- | ----------------------------------------------------- |
| `toList()`      | Converts the pipeline to a numerically indexed array. |
| `toAssoc()`     | Converts the pipeline to an associative array.        |
| `getIterator()` | Returns an iterator for the pipeline.                 |
| `each()`        | Iterates over the pipeline for side effects.          |

## Statistics

| Method              | Description                                           |
| ------------------- | ----------------------------------------------------- |
| `finalVariance()`   | Calculates a full set of statistics.                  |
| `runningVariance()` | Calculates statistics without consuming the pipeline. |

## Utility

| Method           | Description                                            |
| ---------------- | ------------------------------------------------------ |
| `reservoir()`    | Selects a random subset of elements.                   |
| `zip()`          | Combines multiple iterables into a pipeline of tuples. |
| `runningCount()` | Counts elements without consuming the pipeline.        |
| `stream()`       | Converts an array-based pipeline to a stream.          |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://senselab.gitbook.io/senselab-docs/vendor/sanmai/pipeline/docs/reference/method-index.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
