PureBytes Links
Trading Reference Links
|
Fred, see my prev. msg and try this to stress test the
sorting capabilities of ABtool tables containing large
number of rows:
//------------------------------
/* xxTableSortTest.afl
Abtool
Testing table sort on different data types
Below a table of 10000 rows and 3 columns (string, float, int32)
will be createad, randomly filled, and sorted on every single
column ascendingly and descendingly, and exported each time.
Set ROWS to use a different number of rows.
This also shows the use of the new xxRand() func for random numbers.
*/
Filter = 1;
AddColumn(C, "dummy");
ROWS = 10000; // set this
th = xxTableCreate();
// define table:
xxTableColumnAdd("String", 3, th, 25); // string of size 25+1
xxTableColumnAdd("Float", 1, th); // float
xxTableColumnAdd("Int32", 14, th); // int32
// fill table with random data:
for (i = 0; i < ROWS; i++)
{
xxTableDataAddStr("mystrval" + i, i, 0, th);
for (j = 1; j < xxTableGetColCount(th); j++)
{
// generate random numbers betwen 0.0 and 100.0, excluding 100.0
numval = xxRand(100);
xxTableDataAddNum(numval, i, j, th);
}
}
xxTableExport("ABtool/Table_Unsorted.csv", ",", th);
// sort on every column descendingly and export it seperately:
for (j = 0; j < xxTableGetColCount(th); j++)
{
xxTableSort(th, j, false); // descending sort order
xxTableExport("ABtool/Table_Sorted_Descending_on_Column_" + j + ".csv", ",", th);
}
// sort on every column ascendingly and export it seperately:
for (j = 0; j < xxTableGetColCount(th); j++)
{
xxTableSort(th, j, true); // ascending sort order
xxTableExport("ABtool/Table_Sorted_Ascending_on_Column_" + j + ".csv", ",", th);
}
xxTableDelete(th);
xxMsgBox("See generated files in ABtool directory", "Finished");
//------------------------------
----- Original Message -----
From: "Fred" <fctonetti@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Saturday, May 17, 2003 9:25 AM
Subject: [amibroker] Re: ABtool Bugfix - Bug !
> Uenal,
>
> Columns defined as integers are now having trouble receiving data
> correctly whether one uses the newer DataAddNum or the older
> DataAddInt32 i.e. a variety of things that worked prior to 9.7 no
> longer work. In this particular case the data saved in the integer
> (14) columns looks nothing like what was stored in there.
...
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading!
Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/aM1XQD/od7FAA/uetFAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|