Implement MatSerializableAdapter for double matrices