floatvec
Math for vectors (arrays) of numbers
Repository
pjungwir/floatvec
https://github.com/pjungwir/floatvec
Source
floatvec-1.1.1.tar.gz
floatvec-1.1.1.tar.gz
Overview
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 4730 | floatvec | No | Yes | No | Yes | No | Yes | - |
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.1.1 | 1817161514 | floatvec | - |
| RPM | PIGSTY | 1.1.1 | 1817161514 | floatvec_$v | - |
| DEB | PIGSTY | 1.1.1 | 1817161514 | postgresql-$v-floatvec | - |
Build
You can build the RPM / DEB packages for floatvec using pig build:
Install
You can install floatvec directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Install
pig
dnf
apt
Create Extension:
Usage
floatvec: element-by-element arithmetic on PostgreSQL arrays
Provides basic arithmetic functions for operating on arrays treated as vectors. Supports SMALLINT, INTEGER, BIGINT, REAL, and DOUBLE PRECISION.
Functions
Each function accepts two arrays of the same length, or an array and a scalar, or a scalar and an array. Both arguments must be of the same type.
| Function | Description |
|---|---|
vec_add(a, b) | Element-by-element addition |
vec_sub(a, b) | Element-by-element subtraction |
vec_mul(a, b) | Element-by-element multiplication |
vec_div(a, b) | Element-by-element division |
vec_pow(a, b) | Element-by-element exponentiation |
Examples
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)