#include "daal.h"
#include "service.h"
using namespace daal;
using namespace daal::algorithms;
using namespace daal::data_management;
using namespace std;
string datasetFileName = "../data/batch/sorting.csv";
int main(int argc, char *argv[])
{
checkArguments(argc, argv, 1, &datasetFileName);
FileDataSource<CSVFeatureManager> dataSource(datasetFileName, DataSource::doAllocateNumericTable, DataSource::doDictionaryFromContext);
dataSource.loadDataBlock();
sorting::Batch<> algorithm;
printNumericTable(dataSource.getNumericTable(), "Initial matrix of observations:");
algorithm.input.set(sorting::data, dataSource.getNumericTable());
algorithm.compute();
sorting::ResultPtr res = algorithm.getResult();
printNumericTable(res->get(sorting::sortedData), "Sorted matrix of observations:");
return 0;
}