Boost logo

Ublas :

Subject: Re: [ublas] Support for more general ranges
From: Nasos Iliopoulos (nasos_i_at_[hidden])
Date: 2013-06-03 13:22:26


You can add a ticket here:
https://svn.boost.org/trac/boost/newticket

under "feature requests"

Link to this discussion through gmane
(http://article.gmane.org/gmane.comp.lib.boost.ublas/6978) and
(http://article.gmane.org/gmane.comp.lib.boost.ublas/5468)

Best,
-Nasos

On 06/03/2013 12:14 PM, gsermaid wrote:
> Naso,
> Thanks for your prompt reply. It would be great to see this
> integrated. Do I need to do something in order to mark it as a feature
> request?
>
> Giorgos
>
> ----------------------------------------------------------------------
>
> Message: 2
> Date: Mon, 3 Jun 2013 11:04:40 -0400
> From: Nasos Iliopoulos <nasos_i_at_[hidden] <mailto:nasos_i_at_[hidden]>>
> To: ublas_at_[hidden] <mailto:ublas_at_[hidden]>
> Subject: Re: [ublas] Support for more general ranges
> Message-ID: <BLU0-SMTP21206008F6FBCBE4C24FD03999D0_at_phx.gbl
> <mailto:BLU0-SMTP21206008F6FBCBE4C24FD03999D0_at_phx.gbl>>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>
> Giorgo,
> this will probably help you:
> http://boost.2283326.n4.nabble.com/indirect-array-strikes-back-td2711579.html
>
> I don't recall this functionality being integrated though. We should
> probably mark this as a feature request.
>
> -Nasos
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 3 Jun 2013 15:10:46 +0100 (BST)
> From: gsermaid <linuxfever_at_[hidden] <mailto:linuxfever_at_[hidden]>>
> To: "ublas_at_[hidden] <mailto:ublas_at_[hidden]>"
> <ublas_at_[hidden] <mailto:ublas_at_[hidden]>>
> Subject: Re: [ublas] Support for more general ranges
> Message-ID:
> <1370268646.13647.YahooMailNeo_at_[hidden]
> <mailto:1370268646.13647.YahooMailNeo_at_[hidden]>>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hello again,
>
> Further to the recommendation by?oswin krause for trying out
> vector_indirect, I would like to ask the following.
> The documentation
> (http://www.boost.org/doc/libs/1_53_0/libs/numeric/ublas/doc/html/classboost_1_1numeric_1_1ublas_1_1vector__indirect.html#_details)
> states that a vector_indirect can be constructed by a broad range of
> vectors of indices, such as?
> std::vector, ublas::vector or indirect_array.?
>
> The problem is I seem to be able to construct an indirect vector using
> indirect_array types _only_. When for example I use a
> ublas::vector<size_t> or a std::vector<size_t> as a vector of indices
> I get a compilation error from gcc 4.7.2 that there is a preprocess
> member missing.
>
> Is the documentation simply out of date and only the use of
> indirect_arrays is allowed, or is it a bug? Thanks in advance.
>
> Regards,
> Giorgos
>
>
>
> ________________________________
>
>
> Message: 1
> Date: Mon, 20 May 2013 17:49:30 +0100 (BST)
> From: gsermaid <linuxfever_at_[hidden] <mailto:linuxfever_at_[hidden]>>
> To: "ublas_at_[hidden] <mailto:ublas_at_[hidden]>"
> <ublas_at_[hidden] <mailto:ublas_at_[hidden]>>
> Subject: [ublas] Support for more general ranges
> Message-ID:
> ??? <1369068570.74879.YahooMailNeo_at_[hidden]
> <mailto:1369068570.74879.YahooMailNeo_at_[hidden]>>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi all,
>
> I would like to ask if there is any way to create a vector proxy based
> on a general range of indices. For example, if I have
> a vector
>
> vector<unsigned> x(4);
> x <<= 1,2,3,4;
>
> and a vector of indices?
>
> vector<size_t> k(2);
> k <<= 0,3;
>
> I would like to be able to create a vector proxy as follows
>
> vector_proxy<unsigned> mysubvector(x, k);
>
> with the property that
>
> mysubvector[i] = x[k[i]].
>
> I know I can create a simple new class which provides this
> functionality but ideally I also want to have
> all the useful iterator functionality and mathematical operations
> supported by a typical ublas vector. Is this currently supported? If
> not, is there an easy way to?
> implement it and have all the functionality that ublas offer? Finally,
> do you think something like this could be included in future versions?
>
> Regards,
> Giorgos
> -------------- next part --------------
> HTML attachment scrubbed and removed
>
> ------------------------------
>
> Message: 2
> Date: 20 May 2013 18:51:54 +0200
> From: "oswin krause" <oswin.krause_at_[hidden]
> <mailto:oswin.krause_at_[hidden]>>
> To: ublas_at_[hidden] <mailto:ublas_at_[hidden]>
> Subject: Re: [ublas] Support for more general ranges
> Message-ID: <519A54AA.9020907_at_[hidden]
> <mailto:519A54AA.9020907_at_[hidden]>>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>
> Hi,
>
> take a look at vector_indirect.
>
> On 20.05.2013 18:49, gsermaid wrote:
> > Hi all,
> >
> > I would like to ask if there is any way to create a vector proxy based
> > on a general range of indices. For example, if I have
> > a vector
> >
> > vector<unsigned> x(4);
> > x <<= 1,2,3,4;
> >
> > and a vector of indices
> >
> > vector<size_t> k(2);
> > k <<= 0,3;
> >
> > I would like to be able to create a vector proxy as follows
> >
> > vector_proxy<unsigned> mysubvector(x, k);
> >
> > with the property that
> >
> > mysubvector[i] = x[k[i]].
> >
> > I know I can create a simple new class which provides this
> > functionality but ideally I also want to have
> > all the useful iterator functionality and mathematical operations
> > supported by a typical ublas vector. Is this currently supported? If
> > not, is there an easy way to
> > implement it and have all the functionality that ublas offer? Finally,
> > do you think something like this could be included in future versions?
> >
> > Regards,
> > Giorgos
> >
> >
> > _______________________________________________
> > ublas mailing list
> > ublas_at_[hidden] <mailto:ublas_at_[hidden]>
> > http://lists.boost.org/mailman/listinfo.cgi/ublas
> > Sent to: Oswin.Krause_at_[hidden]
> <mailto:Oswin.Krause_at_[hidden]>
>
> -------------- next part --------------
> HTML attachment scrubbed and removed
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden] <mailto:ublas_at_[hidden]>
> http://lists.boost.org/mailman/listinfo.cgi/ublas
>
>
> ------------------------------
>
> End of ublas Digest, Vol 102, Issue 11
> **************************************
> -------------- next part --------------
> HTML attachment scrubbed and removed
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden] <mailto:ublas_at_[hidden]>
> http://lists.boost.org/mailman/listinfo.cgi/ublas
>
>
> ------------------------------
>
> End of ublas Digest, Vol 102, Issue 12
> **************************************
> -------------- next part --------------
> HTML attachment scrubbed and removed
>
> ------------------------------
>
> Message: 2
> Date: Mon, 3 Jun 2013 11:04:40 -0400
> From: Nasos Iliopoulos <nasos_i_at_[hidden] <mailto:nasos_i_at_[hidden]>>
> To: ublas_at_[hidden] <mailto:ublas_at_[hidden]>
> Subject: Re: [ublas] Support for more general ranges
> Message-ID: <BLU0-SMTP21206008F6FBCBE4C24FD03999D0_at_phx.gbl
> <mailto:BLU0-SMTP21206008F6FBCBE4C24FD03999D0_at_phx.gbl>>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>
> Giorgo,
> this will probably help you:
> http://boost.2283326.n4.nabble.com/indirect-array-strikes-back-td2711579.html
>
> I don't recall this functionality being integrated though. We should
> probably mark this as a feature request.
>
> -Nasos
>
>
> On 06/03/2013 10:10 AM, gsermaid wrote:
> > Hello again,
> >
> > Further to the recommendation by oswin krause for trying out
> > vector_indirect, I would like to ask the following.
> > The documentation
> >
> (http://www.boost.org/doc/libs/1_53_0/libs/numeric/ublas/doc/html/classboost_1_1numeric_1_1ublas_1_1vector__indirect.html#_details)
>
> > states that a vector_indirect can be constructed by a broad range of
> > vectors of indices, such as
> > std::vector, ublas::vector or indirect_array.
> >
> > The problem is I seem to be able to construct an indirect vector using
> > indirect_array types _only_. When for example I use a
> > ublas::vector<size_t> or a std::vector<size_t> as a vector of indices
> > I get a compilation error from gcc 4.7.2 that there is a preprocess
> > member missing.
> >
> > Is the documentation simply out of date and only the use of
> > indirect_arrays is allowed, or is it a bug? Thanks in advance.
> >
> > Regards,
> > Giorgos
> >
> >
> > ------------------------------------------------------------------------
> >
> > Message: 1
> > Date: Mon, 20 May 2013 17:49:30 +0100 (BST)
> > From: gsermaid <linuxfever_at_[hidden] <mailto:linuxfever_at_[hidden]>
> <mailto:linuxfever_at_[hidden] <mailto:linuxfever_at_[hidden]>>>
> > To: "ublas_at_[hidden] <mailto:ublas_at_[hidden]>
> <mailto:ublas_at_[hidden] <mailto:ublas_at_[hidden]>>"
> > <ublas_at_[hidden] <mailto:ublas_at_[hidden]>
> <mailto:ublas_at_[hidden] <mailto:ublas_at_[hidden]>>>
> > Subject: [ublas] Support for more general ranges
> > Message-ID:
> > ??? <1369068570.74879.YahooMailNeo_at_[hidden]
> <mailto:1369068570.74879.YahooMailNeo_at_[hidden]>
> > <mailto:1369068570.74879.YahooMailNeo_at_[hidden]
> <mailto:1369068570.74879.YahooMailNeo_at_[hidden]>>>
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> > Hi all,
> >
> > I would like to ask if there is any way to create a vector proxy based
> > on a general range of indices. For example, if I have
> > a vector
> >
> > vector<unsigned> x(4);
> > x <<= 1,2,3,4;
> >
> > and a vector of indices?
> >
> > vector<size_t> k(2);
> > k <<= 0,3;
> >
> > I would like to be able to create a vector proxy as follows
> >
> > vector_proxy<unsigned> mysubvector(x, k);
> >
> > with the property that
> >
> > mysubvector[i] = x[k[i]].
> >
> > I know I can create a simple new class which provides this
> > functionality but ideally I also want to have
> > all the useful iterator functionality and mathematical operations
> > supported by a typical ublas vector. Is this currently supported? If
> > not, is there an easy way to?
> > implement it and have all the functionality that ublas offer? Finally,
> > do you think something like this could be included in future versions?
> >
> > Regards,
> > Giorgos
> > -------------- next part --------------
> > HTML attachment scrubbed and removed
> >
> > ------------------------------
> >
> > Message: 2
> > Date: 20 May 2013 18:51:54 +0200
> > From: "oswin krause" <oswin.krause_at_[hidden]
> <mailto:oswin.krause_at_[hidden]>
> > <mailto:oswin.krause_at_[hidden]
> <mailto:oswin.krause_at_[hidden]>>>
> > To: ublas_at_[hidden] <mailto:ublas_at_[hidden]>
> <mailto:ublas_at_[hidden] <mailto:ublas_at_[hidden]>>
> > Subject: Re: [ublas] Support for more general ranges
> > Message-ID: <519A54AA.9020907_at_[hidden]
> <mailto:519A54AA.9020907_at_[hidden]>
> > <mailto:519A54AA.9020907_at_[hidden]
> <mailto:519A54AA.9020907_at_[hidden]>>>
> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
> >
> > Hi,
> >
> > take a look at vector_indirect.
> >
> > On 20.05.2013 18:49, gsermaid wrote:
> > > Hi all,
> > >
> > > I would like to ask if there is any way to create a vector proxy based
> > > on a general range of indices. For example, if I have
> > > a vector
> > >
> > > vector<unsigned> x(4);
> > > x <<= 1,2,3,4;
> > >
> > > and a vector of indices
> > >
> > > vector<size_t> k(2);
> > > k <<= 0,3;
> > >
> > > I would like to be able to create a vector proxy as follows
> > >
> > > vector_proxy<unsigned> mysubvector(x, k);
> > >
> > > with the property that
> > >
> > > mysubvector[i] = x[k[i]].
> > >
> > > I know I can create a simple new class which provides this
> > > functionality but ideally I also want to have
> > > all the useful iterator functionality and mathematical operations
> > > supported by a typical ublas vector. Is this currently supported? If
> > > not, is there an easy way to
> > > implement it and have all the functionality that ublas offer? Finally,
> > > do you think something like this could be included in future versions?
> > >
> > > Regards,
> > > Giorgos
> > >
> > >
> > > _______________________________________________
> > > ublas mailing list
> > > ublas_at_[hidden] <mailto:ublas_at_[hidden]>
> <mailto:ublas_at_[hidden] <mailto:ublas_at_[hidden]>>
> > > http://lists.boost.org/mailman/listinfo.cgi/ublas
> > > Sent to: Oswin.Krause_at_[hidden]
> <mailto:Oswin.Krause_at_[hidden]>
> > <mailto:Oswin.Krause_at_[hidden]
> <mailto:Oswin.Krause_at_[hidden]>>
> >
> > -------------- next part --------------
> > HTML attachment scrubbed and removed
> >
> > ------------------------------
> >
> > Subject: Digest Footer
> >
> > _______________________________________________
> > ublas mailing list
> > ublas_at_[hidden] <mailto:ublas_at_[hidden]>
> <mailto:ublas_at_[hidden] <mailto:ublas_at_[hidden]>>
> > http://lists.boost.org/mailman/listinfo.cgi/ublas
> >
> >
> > ------------------------------
> >
> > End of ublas Digest, Vol 102, Issue 11
> > **************************************
> > -------------- next part --------------
> > HTML attachment scrubbed and removed
> >
> > ------------------------------
> >
> > Subject: Digest Footer
> >
> > _______________________________________________
> > ublas mailing list
> > ublas_at_[hidden] <mailto:ublas_at_[hidden]>
> <mailto:ublas_at_[hidden] <mailto:ublas_at_[hidden]>>
> > http://lists.boost.org/mailman/listinfo.cgi/ublas
> >
> >
> > ------------------------------
> >
> > End of ublas Digest, Vol 102, Issue 12
> > **************************************
> >
> >
> >
> >
> > _______________________________________________
> > ublas mailing list
> > ublas_at_[hidden] <mailto:ublas_at_[hidden]>
> > http://lists.boost.org/mailman/listinfo.cgi/ublas
> > Sent to: athanasios.iliopoulos.ctr.gr_at_[hidden]
> <mailto:athanasios.iliopoulos.ctr.gr_at_[hidden]>
>
> -------------- next part --------------
> HTML attachment scrubbed and removed
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden] <mailto:ublas_at_[hidden]>
> http://lists.boost.org/mailman/listinfo.cgi/ublas
>
>
> ------------------------------
>
> End of ublas Digest, Vol 103, Issue 2
> *************************************
>
>
>
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
> Sent to: athanasios.iliopoulos.ctr.gr_at_[hidden]