标签:point cout iter into nta 邻居 traits pac 结构
monotone_matrix_search()
and sorted_matrix_search()
are techniques that deal with the problem of efficiently finding largest entries in matrices with certain structural properties. Many concrete problems can be modelled as matrix search problems, and for some of them we provide explicit solutions that allow you to solve them without knowing about the matrix search technique. Examples are, the computation of all furthest neighbors for the vertices of a convex polygon, maximal k-gons inscribed into a planar point set, and computing rectangular p-centers.
monotone_matrix_search()
和 sorted_matrix_search()
处理的问题是在一定结构属性的矩阵中高效寻找最大入口。很多具体的问题可以建模为矩阵搜索问题,有些问题我们可以在你不知道矩阵搜索技术的情况下提供显式解决问题的方法。这方面的例子有:计算一个凸多边形的顶点集的所有最远邻居,一个平面点集的内接最大k边形(k-gon)和求一个矩形p心。
本例我们建立一个随机的向量 a=(ai)i=1,…,5 (由0-99中均匀分布产生)并创建一个笛卡尔矩阵M,矩阵中包含所有ai+aj,i,j∈{1,…,5},如果a排序,则M也排序。则我们可以使用 sorted_matrix_search()
来计算M中a的最大入口的上界。
In the following program we build a random vector a=(ai)i=1,…,5 (elements drawn uniformly from {0,…,99}) and construct a Cartesian matrix M containing as elements all sums ai+aj,i,j∈{1,…,5}. If a is sorted, M is sorted as well. So we can apply sorted_matrix_search()
to compute the upper bound for the maximal entry of a in M.
File Matrix_search/sorted_matrix_search.cpp
Monotone and Sorted Matrix Search
标签:point cout iter into nta 邻居 traits pac 结构
原文地址:https://www.cnblogs.com/myboat/p/9998938.html