# Tag Info

3

It's going to be hard to beat the two naive approaches, iterated squaring and repeated application associating from the right $A(A(A(\cdots Av)))$. Which one of the two is better depends on the value of $k$, sparsity, etc. as noted in the comments. If you are fine with approximations, there might be other options; for instance, you could: (1) treat your ...

5

This is more generally known as the distance geometry problem where we are trying to reconstruct data points given distances between all or some of the points with respect to some distance metric. A common application for $D=3$ is in chemistry/biology where certain experimental techniques can help determine the distance between atoms and the goal is to ...

4

Edit Jan 12 I was pointed by the author of https://arxiv.org/abs/2010.09649 to this simple estimator of trace (explanation), which should also be better than the orthogonalization approach in the original post. function trace_est=simple_hutchplusplus(A, num_queries) % Estimates the trace of square matrix A with num_queries many matrix-vector products % ...

1

Another possible reason might be a historical one: your own version pre-dates the current accepted standard. While this isn't about complex numbers, this discussion of a bug report is on the use of a container-type. The software in question, i.e., OpenFOAM, has been developed from a time long before the standard template library (STL) of C++ has been a thing....

3

Your statistical method is pretty clever. This is less clever, but maybe you can build off the idea. For any matrix $A$, $(AA^T)_{ii}=\sum_m{A_{im}A_{im}}$, and $tr(AA^T)=\sum_i{||A_i||^2}$ where $||A_i||^2$ is the squared norm of the $i$'th row. With that said, you don't need to explicitly calculate the product $AA^T$ to get the trace. For your problem, $A=... 2 I cannot help but suspect that the working function you've provided is less efficient than it can be, but I must also admit that I have only dabbled in computer vision myself. Here's a suggestion for how it might be improved. As you've mentioned, the fundamental matrix$F$is defined as the matrix that satisfies$x_{1}^{T} F x_{2} = 0$for all points$x_{1}$... 0 This is not what you asked for, but I'll point out the low hanging fruit in your implementation anyway. You have many for loops, which will be extremely slow in Python and can be easily sped up with minimal effort using Cython. In my experience the many vstacks will also be slow, since iirc numpy allocates a new contiguous array when concatenating. It would ... 1 You are splitting the vector$x$into its components$(u^Hx)u$that is parallel to$u$and its complement$x-(u^Hx)u$that is orthogonal to$u$. Then the reflected vector is composed by reducing the last one again by the parallel component. The idea being that the reflection on the plane that has$u\$ as normal vector changes the sign of the component ...

Top 50 recent answers are included