采用COMPOSITE设计模式表达复合变差函数的内存模型,为各种类型的变差函数模型实现了统一的访问接口,显著提高了核心代码的重用程度及系统的可维护性和扩展性。同时利用XML实现了变差函数模型的序列化和动态导入,不仅可以方便地记录模型信息,还可以清晰地展现模型的内部结构,为模型的评价分析、模型的对比选择以及相似地质背景下的复用提供了基础。
A memory prototype of variation function based on COMPOSITE design pattern is proposed, through which a uniform visiting interface is implemented and greatly improves the maintainability and expansibility of indispensable code in whole project. Furthermore serialization of variation function and dynamically loading from storage is implemented with XML. Serialization of variation function with XML not only can store away model's information, but can reveal the inner structure of model, and provide basis of evaluation, analysis, contrast and selection of models, as well as repetition use of model under analogical geological environment.