bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-apl] How to build a matrix without knowing its eventual size


From: Elias Mårtenson
Subject: [Bug-apl] How to build a matrix without knowing its eventual size
Date: Wed, 2 Apr 2014 23:57:40 +0800

Right now I'm building the SQLite3 interface (but this will be an issue in other cases too, for example if you need to build native code to convert a CSV file to a matrix)

The problem with the SQLite3 API is that you don't know how many rows the result will have until all the rows have been consumed. Thus, I'm not able to create the Shape object until all the data has been read.

What is the best solution for this? Once thought was to buffer all the Value_P objects in an std::vector and create the result matrix last. But is there a better way? Is there a facility to dynamically extend the size of the matrix as I put more objects into it?

Regards,
Elias

reply via email to

[Prev in Thread] Current Thread [Next in Thread]