[计算几何]Matrices&Linear Systems:Tuples
来源:互联网 发布:淘宝swot分析矩阵图 编辑:程序博客网 时间:2024/06/07 20:19
Conceptually, a tuple is an ordered list of elements; however,
becausethis book is about geometry in computer graphics, we’re going
to restrict our discussions to real numbers.
概念上,tuple是有序的要素列表;在计算几何中,减小讨论范围到实数部分。
- 本书中的符号和伪代码表示方法
Nevertheless, it should be remembered that tuples and matrices may
(conceptually) be composed of complex numbers, or any arbitrary type,
and that much of what is discussed (in terms of properties, in
particular) applies to arbitrary element types.
数组和矩阵都可能由复数组成,亦或者是任意类型,大部分的在讨论,任意类型的应用。
2.2.1 定义
Generically, we refer to a tuple of n elements as an n-tuple and use
subscript notation for it: a = (a 1 , a 2 , … , a n ).
n个元素,有各自的下标
举例
a = (6, 5, 42)b = (3.14, 3.75, 8, 15)
2.2.2 算法操作
相加(减)
Addition (and subtraction) of tuples is meaningful if each tuple has
the same number of elements and the elements represent “corresponding”
quantities.
对两个有相同的元素数量,以及每个元素代表相同的元素数量的元组成对(pairwise)相加。
#Addtiona = (6, 3, 7)b = (1, 2, 4)add = tuple([a[i]+b[i] for i in range(len(a))])print add#(7, 5, 11)
相乘(除)
#Multiplicationscalars = 2.0#2*(6, 3, 7) = (12,6,14)#(6, 3, 7) /2 = (3, 1.5, 3.5)mul = tuple([i*scalars for i in a])div = tuple([i/scalars for i in a])print mul#(12.0, 6.0, 14.0)print div#(3.0, 1.5, 3.5)
复杂的数组操作会提及不同的数据类型,这里先不展开,放到后面适当的语境中展开。
矩阵的representation, properties&application 会成为后面章节的主题。
- [计算几何]Matrices&Linear Systems:Tuples
- [计算几何]Matrices&Linear Systems:Linear Systems
- [计算几何]Matrices&Linear Systems:Matrices
- Signals and Linear Systems
- Solving linear equation systems
- SymPy学习之Matrices (linear algebra)
- tuples
- DE25 Homogeneous Linear Systems with Constant Coefficients
- DE 31 Non-linear Autonomous Systems
- Eigen教程-Solving Sparse Linear Systems
- 计算几何几何函数库
- 计算几何-几何库
- 计算几何
- 计算几何
- 计算几何
- 计算几何
- 计算几何
- 计算几何
- 图解项目管理【基础】
- 【算法】数据结构与算法分析学习笔记——各类二叉查找树的吐血整理
- POJ 3573 I18n 可能会
- 文章标题
- mybatis学习指南--xml文件方式篇
- [计算几何]Matrices&Linear Systems:Tuples
- atexit注册函数
- CSDN日报20170219——《程序员的沟通之痛》
- 20170219 night
- iOS 字典转模型高级实现
- CSS属性之字体属性
- 学习《core java》记录 -- 第四章 Objects and Classes
- show engine innodb status解读
- ALGO-29 算法训练 校门外的树