用超级运算符设计模式实现状态空间表示

Gábor Kusper, Csaba Sass, Szabolcs Márien
{"title":"用超级运算符设计模式实现状态空间表示","authors":"Gábor Kusper, Csaba Sass, Szabolcs Márien","doi":"10.32968/psaie.2019.002","DOIUrl":null,"url":null,"abstract":"While implementing state-space representation technique of arti cial intelligence we found that the mathematical design suggests having a separate state and operator classes. But this breaks the encapsulation principle of OOP. To solve this we introduce a new structural design pattern, the super operator design pattern. A super operator is a proxy to operators, it has a parameter which decides which operator to call, it returns what the operator returns. In this way one class can represent the state-space representation which contains the operators and the states, so we can preserve encapsulation. On the other hand we break separation of concerns and single responsibility principles, since we do not separate states and operators. The set of methods behind the super operator should have a similar contract, because the super operator can ensure only the common part of the contracts of the methods. If this common part is empty, then this design pattern cannot be used. The new design pattern is applicable if iteration over a set of methods is important; a set of methods have similar contract, for the client is all them same which one is called; the understandability is more important than reusability, e.g., educational purposes; forcing encapsulation over separation of concerns is essential.","PeriodicalId":117509,"journal":{"name":"Production Systems and Information Engineering","volume":"79 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1900-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Implementing the State-Space Representation by the Super Operator Design Pattern\",\"authors\":\"Gábor Kusper, Csaba Sass, Szabolcs Márien\",\"doi\":\"10.32968/psaie.2019.002\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"While implementing state-space representation technique of arti cial intelligence we found that the mathematical design suggests having a separate state and operator classes. But this breaks the encapsulation principle of OOP. To solve this we introduce a new structural design pattern, the super operator design pattern. A super operator is a proxy to operators, it has a parameter which decides which operator to call, it returns what the operator returns. In this way one class can represent the state-space representation which contains the operators and the states, so we can preserve encapsulation. On the other hand we break separation of concerns and single responsibility principles, since we do not separate states and operators. The set of methods behind the super operator should have a similar contract, because the super operator can ensure only the common part of the contracts of the methods. If this common part is empty, then this design pattern cannot be used. The new design pattern is applicable if iteration over a set of methods is important; a set of methods have similar contract, for the client is all them same which one is called; the understandability is more important than reusability, e.g., educational purposes; forcing encapsulation over separation of concerns is essential.\",\"PeriodicalId\":117509,\"journal\":{\"name\":\"Production Systems and Information Engineering\",\"volume\":\"79 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1900-01-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Production Systems and Information Engineering\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.32968/psaie.2019.002\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Production Systems and Information Engineering","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.32968/psaie.2019.002","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

在实现人工智能的状态空间表示技术时,我们发现数学设计建议使用单独的状态和算子类。但是这违背了OOP的封装原则。为了解决这个问题,我们引入了一种新的结构设计模式——超算子设计模式。超级操作符是操作符的代理,它有一个参数决定调用哪个操作符,它返回操作符返回的内容。通过这种方式,一个类可以表示包含操作符和状态的状态空间表示,因此我们可以保留封装。另一方面,我们打破了关注点分离和单一职责原则,因为我们没有分离状态和操作符。超级操作符背后的方法集应该具有类似的契约,因为超级操作符只能保证方法契约的公共部分。如果此公共部分为空,则不能使用此设计模式。如果对一组方法的迭代很重要,那么新的设计模式是适用的;一组方法具有相似的契约,因为被调用的客户端都是相同的;可理解性比可重用性更重要,例如,教育目的;强制封装优于关注点分离是必要的。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Implementing the State-Space Representation by the Super Operator Design Pattern
While implementing state-space representation technique of arti cial intelligence we found that the mathematical design suggests having a separate state and operator classes. But this breaks the encapsulation principle of OOP. To solve this we introduce a new structural design pattern, the super operator design pattern. A super operator is a proxy to operators, it has a parameter which decides which operator to call, it returns what the operator returns. In this way one class can represent the state-space representation which contains the operators and the states, so we can preserve encapsulation. On the other hand we break separation of concerns and single responsibility principles, since we do not separate states and operators. The set of methods behind the super operator should have a similar contract, because the super operator can ensure only the common part of the contracts of the methods. If this common part is empty, then this design pattern cannot be used. The new design pattern is applicable if iteration over a set of methods is important; a set of methods have similar contract, for the client is all them same which one is called; the understandability is more important than reusability, e.g., educational purposes; forcing encapsulation over separation of concerns is essential.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信