LPXLFOPER EXCEL_EXPORT xlSystemTime( LPXLFOPER ticksPerSeconda) { EXCEL_BEGIN; if (XlfExcel::Instance().IsCalledByFuncWiz()) return XlfOper(true); XlfOper ticksPerSecondb( (ticksPerSeconda)); CellMatrix ticksPerSecond( ticksPerSecondb.AsCellMatrix("ticksPerSecond")); HiResTimer t; double result( SystemTime( ticksPerSecond) ); CellMatrix resultCells(result); CellMatrix time(1,2); time(0,0) = "time taken"; time(0,1) = t.elapsed(); resultCells.PushBottom(time); return XlfOper(resultCells); EXCEL_END }
LPXLFOPER EXCEL_EXPORT xlEchoArgList( LPXLFOPER argsa) { EXCEL_BEGIN; if (XlfExcel::Instance().IsCalledByFuncWiz()) return XlfOper(true); XlfOper argsb( (argsa)); CellMatrix argsc( argsb.AsCellMatrix("argsc")); ArgumentList args( ArgumentList(argsc,"args")); HiResTimer t; CellMatrix result( EchoArgList( args) ); CellMatrix resultCells(result); CellMatrix time(1,2); time(0,0) = "time taken"; time(0,1) = t.elapsed(); resultCells.PushBottom(time); return XlfOper(resultCells); EXCEL_END }
LPXLFOPER EXCEL_EXPORT xlstats( LPXLFOPER dataa) { EXCEL_BEGIN; if (XlfExcel::Instance().IsCalledByFuncWiz()) return XlfOper(true); XlfOper datab( (dataa)); MyArray data( datab.AsArray("data")); HiResTimer t; MyArray result( stats( data) ); CellMatrix resultCells(result); CellMatrix time(1,2); time(0,0) = "time taken"; time(0,1) = t.elapsed(); resultCells.PushBottom(time); return XlfOper(resultCells); EXCEL_END }
LPXLFOPER EXCEL_EXPORT xlEchoCells( LPXLFOPER Echoeea) { EXCEL_BEGIN; if (XlfExcel::Instance().IsCalledByFuncWiz()) return XlfOper(true); XlfOper Echoeeb( (Echoeea)); CellMatrix Echoee( Echoeeb.AsCellMatrix("Echoee")); HiResTimer t; CellMatrix result( EchoCells( Echoee) ); CellMatrix resultCells(result); CellMatrix time(1,2); time(0,0) = "time taken"; time(0,1) = t.elapsed(); resultCells.PushBottom(time); return XlfOper(resultCells); EXCEL_END }
LPXLFOPER EXCEL_EXPORT xlMCVanillaChoiceEulerStepping( LPXLFOPER parametersMatrixa) { EXCEL_BEGIN; if (XlfExcel::Instance().IsCalledByFuncWiz()) return XlfOper(true); XlfOper parametersMatrixb( (parametersMatrixa)); CellMatrix parametersMatrix( parametersMatrixb.AsCellMatrix("parametersMatrix")); HiResTimer t; CellMatrix result( MCVanillaChoiceEulerStepping( parametersMatrix) ); CellMatrix resultCells(result); CellMatrix time(1,2); time(0,0) = "time taken"; time(0,1) = t.elapsed(); resultCells.PushBottom(time); return XlfOper(resultCells); EXCEL_END }
LPXLFOPER EXCEL_EXPORT xlMCVanillaChoice3( LPXLFOPER parametersMatrixa, double seeda) { EXCEL_BEGIN; if (XlfExcel::Instance().IsCalledByFuncWiz()) return XlfOper(true); XlfOper parametersMatrixb( (parametersMatrixa)); CellMatrix parametersMatrix( parametersMatrixb.AsCellMatrix("parametersMatrix")); unsigned long seed( static_cast<unsigned long>(seeda)); HiResTimer t; CellMatrix result( MCVanillaChoice3( parametersMatrix, seed) ); CellMatrix resultCells(result); CellMatrix time(1,2); time(0,0) = "time taken"; time(0,1) = t.elapsed(); resultCells.PushBottom(time); return XlfOper(resultCells); EXCEL_END }
LPXLFOPER EXCEL_EXPORT xlmxlw_EchoDate( double date) { EXCEL_BEGIN; if (XlfExcel::Instance().IsCalledByFuncWiz()) return XlfOper(true); HiResTimer t; double result( mxlw_EchoDate( date) ); CellMatrix resultCells(result); CellMatrix time(1,2); time(0,0) = "time taken"; time(0,1) = t.elapsed(); resultCells.PushBottom(time); return XlfOper(resultCells); EXCEL_END }