Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorU-NORTHAMERICA\jcl <jcl@JCL.northamerica.corp.microsoft.com>2013-04-01 22:49:33 +0400
committerU-NORTHAMERICA\jcl <jcl@JCL.northamerica.corp.microsoft.com>2013-04-01 22:49:33 +0400
commit83ad7bba0717b3d48899a7bcd11521ff68f8933f (patch)
treefc0153138df47268c43816d7d93e9d81d2ded458 /vowpalwabbit/vwdll.cpp
parent4fba51a2f64eff47e47e268710338d50f44e104a (diff)
added C# interface to weights
Diffstat (limited to 'vowpalwabbit/vwdll.cpp')
-rw-r--r--vowpalwabbit/vwdll.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/vowpalwabbit/vwdll.cpp b/vowpalwabbit/vwdll.cpp
index 095c4a60..8e00693e 100644
--- a/vowpalwabbit/vwdll.cpp
+++ b/vowpalwabbit/vwdll.cpp
@@ -127,4 +127,16 @@ extern "C"
pointer->learn(ex);
return ex->final_prediction;
}
+
+ VW_DLL_MEMBER float VW_CALLING_CONV VW_Get_Weight(VW_HANDLE handle, uint32_t index)
+ {
+ vw* pointer = static_cast<vw*>(handle);
+ return VW::get_weight(*pointer, index);
+ }
+
+ VW_DLL_MEMBER uint32_t VW_CALLING_CONV VW_Num_Weights(VW_HANDLE handle)
+ {
+ vw* pointer = static_cast<vw*>(handle);
+ return VW::num_weights(*pointer);
+ }
} \ No newline at end of file