Hello,
Does anybody have any experience of using the CMPH hashing library to create specific hash functions callable from c#. Any help would be appreciated
Does anybody know of any state of the art hashing algorithms that can be called from c# and don't explicity offer a copyleft licence.
Thanks
Bob.
...
LD = Levenshtein Distance
Just doing a few examples on paper, this seems to work, but does anyone know if this is always true?
Lets say I have 3 strings
BOT
BOB
BOM
LD(BOT,BOB) = 1
and
LD(BOB,BOM)=1
then
LD(BOT,BOM)=max(LD(BOT,BOB) , LD(BOB,DOM))=1
OR
BAAB
BBAB
BCCD
LD(BBAB,BAAB) = 1
and
LD(BBAB,BCCD)=3
then
LD...
I have a sorted dictionary where the key is a date and the value is a integer that represents time left. i have 3 years worth of data
so it would be something like
Key: 2009-1-1, Value: 100
Key: 2009-1-2, Value: 97
Key: 2009-1-3, Value: 92
Key: 2009-1-4, Value: 87
...
...
Key: 2009-1-30, Value: 0
I would like to calculate average chan...
Hi,
A-B-C-D are 4 points. We define r = length(B-C), angle, ang1 = (A-B-C) and angle ang2 = (B-C-D) and the torsion angle tors1 = (A-B-C-D). What I really need to do is to find the coordinates of C and D provided that I have the new values of r, ang1, ang2 and tors1.
The thing is that the points A and B are rigidly connected to each ot...
function source_of (array, up_to_dimension) {
// Your implementation
}
source_of([1, [2, [3]]], 0) == '[1, ?]'
source_of([1, [2, [3]]], 1) == '[1, [2, ?]]'
source_of([1, [2, [3]]], 2) == '[1, [2, [3]]]'
source_of([532, 94, [13, [41, 0]], [], 49], 0) == '[532, 94, ?, ?, 49]'
I have very huge multidimensional array and I want to ser...
What is the most efficient algorithm to find intersection point between two lines?
You are given four points A, B , C , D.
Find the intersection point between AB and CD.
Optimize the algorithm as much as you can.
There are two approach for this, one is using dot product and another is using slope intercept form for line. which one is ...
When storing and manipulating sparse matrices on a computer (zeros and ones), it is beneficial and often necessary to use specialized algorithms and data structures that take advantage of the sparse structure of the matrix. Operations using standard matrix structures and algorithms are slow and consume large amounts of memory when applie...
Bing's search hits are quite impressive, has Microsoft not let anyone in on behind the scenes of their search technology? Tried http://www.discoverbing.com but couldn't find the answer to my question.
...
How to find the minimum perpendicular distance of point from a line in 3D plane?
Please give me the logic and I will try to code on myself.
Please let me know how to do it in terms of x,y,z that is in terms of coordinate systems.
I am finding it a bit difficult to find the right solution which will be easy from a coding point of view....
Hello,
I've developed a method called "rotate" to my stack object class. What I did was that if the stack contains elements: {0,2,3,4,5,6,7} I would needed to rotate the elements forwards and backwards.
Where if i need to rotate forwards by 2 elements, then we would have, {3,4,5,6,7,0,2} in the array. And if I need to rotate backwards,...
Given a large array how can it be split into smaller arrays with the size of the smaller arrays specified as an argument of the method?
For instance, given numbers, what would Split's implementation be?
int[] numbers = new int[7845];
int[][] sectionedNumbers = numbers.Split(1000);
sectionedNumbers.Length; //outputs 8
sectionedNumbers...
What is the best way to visit all the nodes of a linked tree (all nodes have references to parent and all children, root nodes have null as parent), so that no node is visited before any of its ancestors? Brownie points for non-recursive.
...
I am trying to learn about data structures and algorithms on my own. I wrote my own double-linked list in C and now I want to write some algorithms to perform on the list. What is the preferred way to swap list items? Is it better to swap the content or to rearrange the pointers which point to the next and previous list item?
...
I'm building a 2D physics engine and I want to add broad-phase collision detection, though I only know of 2 or 3 types:
Check everything against everything else (O(n^2) complexity)
Sweep and Prune (sort and sweep)
something about Binary Space Partition (not sure how to do this)
But surely there's more options right? what are they? A...
Let's say I have an encrypted file on an iPhone and every time I want to decrypt it, I want to "draw" a decryption symbol instead of having to use a keyboard to type it in.
If you request from the user to draw a symbol to decrypt a file every time it is needed (e.g. every time they launch your application) they would probably prefer it ...
I am trying to come up with an algorithm to compare two strings. It would register a match any words that contain the same letters. For example rent and tern would be equivalent because they both contain the letters r,e,n,t.
EDIT I apologize for being so vague. The comparison is going to be made on two sets of a few thousands of words h...
When I run my program I get this error nullPointerException: null.
import model.*;
import java.awt.*;
import java.awt.event.*;
import java.text.*;
import javax.swing.*;
public class ButtonPanel extends JPanel implements View
{
private Prison prison;
private LeftInputPanel leftInput;
private DaysPanel days;
private MonthsPanel months;
...
Let's say I've a string "12345" I should obtain all subsequence combinations of this string such as:
--> 1 2 3 4 5
--> 12 13 14 15 23 24 25 34 35 45
--> 123 124 125 234 235 345
--> 1234 1235 1245 1345 2345
--> 12345
Please note that I grouped them in different number of chars but not changed their order. I need a method/function does...
I could compute the distance between each point and take the largest but that doesn't sound like a very efficient way to do it when there are a large (> 1000) number of points.
Note: This is for iPhone so I don't have a ton of processing power.
...
I'm trying to solve one of the Project Euler problems. As a consequence, I need an algorithm that will help me find all possible partitions of a set, in any order.
For instance, given the set 2 3 3 5:
2 | 3 3 5
2 | 3 | 3 5
2 | 3 3 | 5
2 | 3 | 3 | 5
2 5 | 3 3
and so on. Pretty much every possible combination of the members of the set....