/*!\file MatlabVectorToVector.cpp
 */

/*Headers:*/
/*{{{*/
#ifdef HAVE_CONFIG_H
	#include <config.h>
#else
#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
#endif

#include <mex.h>
#include <stdio.h>
#include <string.h>
#include "./matlabio.h"
#include "../../classes/classes.h"
#include "../../shared/shared.h"
#include "../../Container/Container.h"
#include "../../include/include.h"
#include "../../toolkits/toolkits.h"
	
/*}}}*/

Vector* MatlabVectorToVector(const mxArray* mxvector){

	int dummy;
	Vector* vector=NULL;

	/*allocate vector object: */
	vector=new Vector();

	#ifdef _HAVE_PETSC_
	vector->pvector=MatlabVectorToPetscVec(mxvector);
	#else
	vector->svector=MatlabVectorToSeqVec(mxvector);
	#endif
	
	return vector;
}
