About 24,200,000 results
Open links in new tab
  1. algorithm - Calculate distance between two latitude-longitude points ...

    Aug 26, 2008 · How do I calculate the distance between two points specified by latitude and longitude? For clarification, I'd like the distance in kilometers; the points use the WGS84 system and I'd like to unde...

  2. algorithm - Finding all possible combinations of numbers to reach a ...

    Jan 8, 2011 · How would you go about testing all possible combinations of additions from a given set N of numbers so they add up to a given final number? A brief example: Set of numbers to add: N = {1,5,22,15,0...

  3. How does a 'diff' algorithm work, e.g. in VCDIFF and DiffMerge?

    The algorithm was independently discovered as described in "Algorithms for Approximate String Matching", E. Ukkonen, `Information and Control' Vol. 64, 1985, pp. 100-118. Reading the papers then looking at the source code for an implementation should …

  4. algorithm - Peak signal detection in realtime timeseries data - Stack ...

    Robust peak detection algorithm (using z-scores) I came up with an algorithm that works very well for these types of datasets. It is based on the principle of dispersion: if a new datapoint is a given x number of standard deviations away from a moving mean, the algorithm gives a signal. The algorithm is very robust because it constructs a separate moving mean and deviation, such that previous ...

  5. Big O, how do you calculate/approximate it? - Stack Overflow

    Most people with a degree in CS will certainly know what Big O stands for. It helps us to measure how well an algorithm scales. But I'm curious, how do you calculate or approximate the complexity...

  6. algorithm - 3D Least Squares Plane - Stack Overflow

    Sep 9, 2009 · This is a comment. If someone would be so kind as to move it into the comments for Stephen Canon's answer, that would be great. This, I hope, clarifies what the heck he meant by "The three components of the solution vector are the coefficients to the least-square fit plane {a,b,c}." First, it is elementary matrix algebra that given Ax = b where A is a matrix, and b and x are vectors that …

  7. algorithm - Looping in a spiral - Stack Overflow

    Dec 30, 2008 · A friend was in need of an algorithm that would let him loop through the elements of an NxM matrix (N and M are odd). I came up with a solution, but I wanted to see if my fellow SO'ers could come u...

  8. algorithm - how to calculate binary search complexity - Stack Overflow

    Nov 18, 2011 · 5 The time complexity of the binary search algorithm belongs to the O (log n) class. This is called big O notation. The way you should interpret this is that the asymptotic growth of the time the function takes to execute given an input set of size n will not exceed log n.

  9. algorithm - Use Dijkstra's to find a Minimum Spanning Tree? - Stack ...

    Mar 14, 2017 · Prim's Algorithm, which is known to produce a minimum spanning tree, is highly similar to Dijkstra's Algorithm, but at each stage it greedily selects the next edge that is closest to any vertex currently in the working MST at that stage. Let's use this observation to produce a counterexample.

  10. What are some algorithms for comparing how similar two strings are?

    What you're looking for are called String Metric algorithms. There a significant number of them, many with similar characteristics. Among the more popular: Levenshtein Distance : The minimum number of single-character edits required to change one word into the other. Strings do not have to be the same length Hamming Distance : The number of characters that are different in two equal length ...