On Monday, 5 September 2016 at 06:45:07 UTC, data pulverizer
wrote:
I just realized that typeid only gives the class and not the
actual type, so the object will still need to be cast as you
mentioned above, however your above function will not infer T,
so the user will have to provide it. I
On Monday, 5 September 2016 at 06:45:07 UTC, data pulverizer
wrote:
On Sunday, 4 September 2016 at 14:49:30 UTC, Lodovico Giaretta
wrote:
Your getCol(i) could become getCol!T(i) and return an instance
of GenericVector!T directly, after checking that the required
column has in fact that type:
On Monday, 5 September 2016 at 06:45:07 UTC, data pulverizer
wrote:
On Sunday, 4 September 2016 at 14:49:30 UTC, Lodovico Giaretta
wrote:
Your getCol(i) could become getCol!T(i) and return an instance
of GenericVector!T directly, after checking that the required
column has in fact that type:
On Sunday, 4 September 2016 at 14:49:30 UTC, Lodovico Giaretta
wrote:
Your getCol(i) could become getCol!T(i) and return an instance
of GenericVector!T directly, after checking that the required
column has in fact that type:
GenericVector!T getCol!T(size_t i)
{
if(typeid(cols[i]) ==
On Sunday, 4 September 2016 at 14:49:30 UTC, Lodovico Giaretta
wrote:
On Sunday, 4 September 2016 at 14:24:12 UTC, data pulverizer
wrote:
On Sunday, 4 September 2016 at 14:20:24 UTC, data pulverizer
wrote:
@Lodovico Giaretta BTW what do you mean that my code is not
very D style? Please expand
On Sunday, 4 September 2016 at 14:24:12 UTC, data pulverizer
wrote:
On Sunday, 4 September 2016 at 14:20:24 UTC, data pulverizer
wrote:
On Sunday, 4 September 2016 at 14:07:54 UTC, data pulverizer
wrote:
@Lodovico Giaretta Thanks I just saw your update!
@Lodovico Giaretta BTW what do you
On Sunday, 4 September 2016 at 14:02:03 UTC, Lodovico Giaretta
wrote:
Your code is not very D style
... Well I guess I could have contracted the multiple
constructors in GenericVector(T) and and DataFrame?
On Sunday, 4 September 2016 at 14:07:54 UTC, data pulverizer
wrote:
@Lodovico Giaretta Thanks I just saw your update!
On Sunday, 4 September 2016 at 14:20:24 UTC, data pulverizer
wrote:
On Sunday, 4 September 2016 at 14:07:54 UTC, data pulverizer
wrote:
@Lodovico Giaretta Thanks I just saw your update!
@Lodovico Giaretta BTW what do you mean that my code is not very
D style? Please expand on this ...
On Sunday, 4 September 2016 at 09:55:53 UTC, data pulverizer
wrote:
My main question is how to return GenericVector!(T) from the
getCol() method in the Table class instead of BaseVector.
I think I just solved my own query, change the BaseVector
interface to a class and override it in the
On Sunday, 4 September 2016 at 09:55:53 UTC, data pulverizer
wrote:
I am trying to build a data table object with unrestricted
column types. The approach I am taking is to build a generic
interface BaseVector class and then a subtype GenericVector(T)
which inherits from the BaseVector. I then
On Sunday, 4 September 2016 at 09:55:53 UTC, data pulverizer
wrote:
[...]
Your code is not very D style and, based on your needs, there may
be better ways to achieve your goal, but without knowing your use
case, it's difficult to give correct advice.
Talking about that writeln statement,
I am trying to build a data table object with unrestricted column
types. The approach I am taking is to build a generic interface
BaseVector class and then a subtype GenericVector(T) which
inherits from the BaseVector. I then to build a Table class which
contains columns that is a BaseVector
13 matches
Mail list logo