From: | Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com> |
---|---|
To: | Ants Aasma <ants(dot)aasma(at)eesti(dot)ee>, Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Does people favor to have matrix data type? |
Date: | 2016-05-25 12:46:08 |
Message-ID: | 9A28C8860F777E439AA12E8AEA7694F8011F55DA@BPXM15GP.gisp.nec.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On Wed, May 25, 2016 at 10:38 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> > On 25 May 2016 at 03:52, Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com> wrote:
> >>
> >> In a few days, I'm working for a data type that represents matrix in
> >> mathematical area. Does people favor to have this data type in the core,
> >> not only my extension?
> >
> >
> > If we understood the use case, it might help understand whether to include
> > it or not.
> >
> > Multi-dimensionality of arrays isn't always useful, so this could be good.
>
> Many natural language and image processing methods extract feature
> vectors that then use some simple distance metric, like dot product to
> calculate vector similarity. For example we presented a latent
> semantic analysis prototype at pgconf.eu 2015 that used real[] to
> store the features and a dotproduct(real[], real[]) real function to
> do similarity matching. However using real[] instead of a hypothetical
> realvector or realmatrix did not prove to be a huge overhead, so
> overall I'm on the fence for the usefulness of a special type. Maybe a
> helper function or two to validate the additional restrictions in a
> check constraint would be enough.
>
The 'matrix' data type as domain type of real[] is an option to implement.
We can define operators on the domain types, thus, it allows us to process
large amount of calculation by one operation, in native binary speed.
My only concern is that domain type is not allowed to define type cast.
If we could add type cast on domain, we can define type transformation from
other array type to matrix.
Thanks,
--
NEC Business Creation Division / PG-Strom Project
KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>
From | Date | Subject | |
---|---|---|---|
Next Message | ktm@rice.edu | 2016-05-25 13:22:43 | Re: Does people favor to have matrix data type? |
Previous Message | Jeff Janes | 2016-05-25 12:45:19 | Re: [BUGS] BUG #14155: bloom index error with unlogged table |