深入理解Go:语法、语义与细节探索

需积分: 10 1 下载量 142 浏览量 更新于2024-07-17 收藏 3.08MB PDF 举报
"Go 101 是一本专注于 Go 语言语法、语义及各种细节的书籍。旨在帮助 Go 语言的学习者深入全面地理解 Go 语言,对初学者和经验丰富的 Go 开发者都有所助益。" 本书的内容结构分为多个章节,详细介绍了 Go 语言的基础知识和高级特性: 1. 关于 Go 101:为什么写这本书 这部分可能解释了作者写作的动机,以及读者为何应该阅读这本书,它可能会涵盖 Go 语言的独特之处和其在编程领域的价值。 2. 致谢 作者可能在这里感谢对书籍出版有贡献的人或机构。 3. Go 语言简介:为什么学习 Go 本章将介绍 Go 语言的优点和应用场景,包括其并发模型、简洁的语法和高性能等特性,帮助读者理解学习 Go 的必要性。 4. 官方 Go SDK:如何编译和运行 Go 程序 这一部分将教授读者如何安装 Go 开发工具包(SDK),并演示如何编译和运行 Go 代码,是初学者入门的必备知识。 5-23. Go 语言基础与进阶特性 - 第5章至第12章涵盖了 Go 语言的基本语法元素,如关键字、标识符、基本类型、常量变量、运算符、函数声明和调用、代码包和包导入、表达式、语句和简单语句以及基本控制流。这些章节旨在让读者熟悉 Go 语言的代码结构。 - 第13章介绍了 Goroutines、延迟函数调用和 Panic/Recover,这是 Go 语言并发处理的核心机制,使得程序可以同时执行多个任务。 - 第14章概述了 Go 类型系统,这是理解 Go 编程的关键,包括类型定义、类型转换等。 - 第15章到第19章讲解了指针、结构体、值部件、数组、切片和映射,这些都是 Go 中常用的数据结构。 - 第20章探讨了函数,包括可变参数函数、函数类型和函数值,进一步扩展了对 Go 函数的理解。 - 第21章介绍了通道(Channels),这是 Go 语言特有的并发同步机制,使得不同 goroutines 之间的通信变得更加安全和高效。 - 第22章讲述了方法,这对于面向对象编程非常重要,允许在数据结构上定义行为。 - 第23章讲解了接口,这是 Go 语言的动态类型实现,支持反射和多态性,对于实现抽象和设计模式至关重要。 通过以上内容,读者将能够全面了解 Go 语言,并具备编写高效、可靠 Go 程序的能力。这本书不仅适合初学者,也适合希望深入研究 Go 语言特性的开发者。

Compared with homogeneous network-based methods, het- erogeneous network-based treatment is closer to reality, due to the different kinds of entities with various kinds of relations [22– 24]. In recent years, knowledge graph (KG) has been utilized for data integration and federation [11, 17]. It allows the knowledge graph embedding (KGE) model to excel in the link prediction tasks [18, 19]. For example, Dai et al. provided a method using Wasser- stein adversarial autoencoder-based KGE, which can solve the problem of vanishing gradient on the discrete representation and exploit autoencoder to generate high-quality negative samples [20]. The SumGNN model proposed by Yu et al. succeeds in inte- grating external information of KG by combining high-quality fea- tures and multi-channel knowledge of the sub-graph [21]. Lin et al. proposed KGNN to predict DDI only based on triple facts of KG [66]. Although these methods have used KG information, only focusing on the triple facts or simple data fusion can limit performance and inductive capability [69]. Su et al. successively proposed two DDIs prediction methods [55, 56]. The first one is an end-to-end model called KG2ECapsule based on the biomedical knowledge graph (BKG), which can generate high-quality negative samples and make predictions through feature recursively propagating. Another one learns both drug attributes and triple facts based on attention to extract global representation and obtains good performance. However, these methods also have limited ability or ignore the merging of information from multiple perspectives. Apart from the above, the single perspective has many limitations, such as the need to ensure the integrity of related descriptions, just as network-based methods cannot process new nodes [65]. So, the methods only based on network are not inductive, causing limited generalization [69]. However, it can be alleviated by fully using the intrinsic property of the drug seen as local information, such as chemical structure (CS) [40]. And a handful of existing frameworks can effectively integrate multi-information without losing induction [69]. Thus, there is a necessity for us to propose an effective model to fully learn and fuse the local and global infor- mation for improving performance of DDI identification through multiple information complementing.是什么意思

2023-06-11 上传