How to serialize armadillo's vector

后端 未结 3 792
轻奢々
轻奢々 2020-12-20 01:27

How can I serialize arma::Col? Below are a MWE and the error output.

MWE:

#include 
#i         


        
3条回答
  •  囚心锁ツ
    2020-12-20 01:59

    Since arm::Col::fixed doesn't support serialisation itself, you can either write it in your S class, or write a class that wraps it and serialises it. I'd recommend the 2nd option since it will let you use arm::Col::fixed in anything that you want to serialise without repeating.

提交回复
热议问题