Re: efficient math vector operations on arrays

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: efficient math vector operations on arrays
Дата
Msg-id 56832215.5030501@BlueTreble.com
обсуждение исходный текст
Ответ на Re: efficient math vector operations on arrays  (Jony Cohen <jony.cohenjo@gmail.com>)
Ответы Re: efficient math vector operations on arrays  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On 12/27/15 2:00 AM, Jony Cohen wrote:
> Hi, Don't know if it's exactly what you're looking for but the MADLib
> package has utility function for matrix and vector operations.
> see: http://doc.madlib.net/latest/group__grp__array.html

Apply an operator to al elements on an array or pair of arrays:
http://theplateisbad.blogspot.com/2015/12/the-arraymath-extension-vs-plpgsql.html,
https://github.com/pramsey/pgsql-arraymath.

See also
http://theplateisbad.blogspot.com/2015/12/more-fortran-90-like-vector-operations.html.

BTW, if you want to simply apply a function to all elements in an array
there is an internal C function array_map that can do it. There's no SQL
interface to it, but it shouldn't be hard to add one.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com


В списке pgsql-general по дате отправления:

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: cannot get stable function to use index
Следующее
От: Tom Lane
Дата:
Сообщение: Re: cannot get stable function to use index