正在加载图片...
CONTENTS 11 More complicated arithmetic operations 11.1 Calculating distances 11.1.1 Euclidean distance 11.1.2 Distance between two points 11.1.3 Euclidean distance vector 11.14 Euclidean distance matrix 11.1.5 Special case when both matrices are identical 11.16 Mahalanobis distance 12 Statistics, probability and combinatorics 12. 1 Discrete uniform sampling with replacement 12.2 Discrete weighted sampling with replacement 12.3 Discrete uniform sampling without replacement 12.4 Combinations 12.4.1 Counting combination 12.4.2 Generating 12.5 Permutations 5.1 Counting permutations 12.5.2 Generating permutations 13 Identifying types of arrays 13.1 Numeric array 13.2 Real array 13.3 Identify real or purely imaginary elements 13.4 Array of negative, non-negative or positive values 13.5 Array of integers 13.6 Scalar 13. 7 Vector 13.8 Matrix 13.9 Array slice 14 Logical operators and comparisons 14.1 List of logical operators 14.2 Rules for logical operators 44 14.3 Quick tests before slow ones 15 Miscellaneous 15.1 Accessing elements on the dia 46 15.2 Creating index vector from index limits 47 15.3 Matrix with different incremental runs 15.4 Finding indices 15.4.1 First non-zero element in each column 15.4.2 First non-zero element in each row 15.4.3 Last non-zero element in each row 15.5 Run-length encoding and decoding 15.5.1 Run-length ene 5.6 Counting biCONTENTS iv 11 More complicated arithmetic operations 35 11.1 Calculating distances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 11.1.1 Euclidean distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 11.1.2 Distance between two points . . . . . . . . . . . . . . . . . . . . . . . . . . 35 11.1.3 Euclidean distance vector . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 11.1.4 Euclidean distance matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 11.1.5 Special case when both matrices are identical . . . . . . . . . . . . . . . . . 36 11.1.6 Mahalanobis distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 12 Statistics, probability and combinatorics 38 12.1 Discrete uniform sampling with replacement . . . . . . . . . . . . . . . . . . . . . . 38 12.2 Discrete weighted sampling with replacement . . . . . . . . . . . . . . . . . . . . . 38 12.3 Discrete uniform sampling without replacement . . . . . . . . . . . . . . . . . . . . 38 12.4 Combinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 12.4.1 Counting combinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 12.4.2 Generating combinations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 12.5 Permutations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 12.5.1 Counting permutations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 12.5.2 Generating permutations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 13 Identifying types of arrays 41 13.1 Numeric array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 13.2 Real array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 13.3 Identify real or purely imaginary elements . . . . . . . . . . . . . . . . . . . . . . . 42 13.4 Array of negative, non-negative or positive values . . . . . . . . . . . . . . . . . . . 42 13.5 Array of integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 13.6 Scalar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 13.7 Vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 13.8 Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 13.9 Array slice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 14 Logical operators and comparisons 44 14.1 List of logical operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 14.2 Rules for logical operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 14.3 Quick tests before slow ones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 15 Miscellaneous 46 15.1 Accessing elements on the diagonal . . . . . . . . . . . . . . . . . . . . . . . . . . 46 15.2 Creating index vector from index limits . . . . . . . . . . . . . . . . . . . . . . . . 47 15.3 Matrix with different incremental runs . . . . . . . . . . . . . . . . . . . . . . . . . 48 15.4 Finding indices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 15.4.1 First non-zero element in each column . . . . . . . . . . . . . . . . . . . . . 48 15.4.2 First non-zero element in each row . . . . . . . . . . . . . . . . . . . . . . . 49 15.4.3 Last non-zero element in each row . . . . . . . . . . . . . . . . . . . . . . . 50 15.5 Run-length encoding and decoding . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 15.5.1 Run-length encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 15.5.2 Run-length decoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 15.6 Counting bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有