Skip to content

Instantly share code, notes, and snippets.

@karlnapf
Created July 18, 2013 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karlnapf/6028411 to your computer and use it in GitHub Desktop.
Save karlnapf/6028411 to your computer and use it in GitHub Desktop.
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Written (W) 2013 Soumyajit De
*/
#include <shogun/lib/common.h>
#include <shogun/lib/SGVector.h>
#include <shogun/lib/SGSparseVector.h>
#include <shogun/lib/SGSparseMatrix.h>
//#include <gtest/gtest.h>
using namespace shogun;
void testa()
{
int32_t num_feat=2;
int32_t num_vec=5;
SGSparseMatrix<complex64_t> m(num_feat, num_vec);
SGSparseVector<complex64_t> sparse_vec(num_feat);
m.sparse_matrix[0]=sparse_vec;
}
void testb()
{
int32_t num_feat=2;
int32_t num_vec=5;
SGSparseMatrix<float64_t> m(num_feat, num_vec);
SGSparseVector<float64_t> sparse_vec(num_feat);
m.sparse_matrix[0]=sparse_vec;
}
int main(int argc, char** argv)
{
init_shogun_with_defaults();
sg_io->set_loglevel(MSG_DEBUG);
testb();
testa();
exit_shogun();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment