|
If you do this for the cryptograpy purposes use any kind of Crypto API, it works with very long integers.
|
|
|
|
|
I know there's lots - but does anyone have favorites, for ease of use and scope?
|
|
|
|
|
You might get better results asking for an algorithm rather than code.
If you don't have the data, you're just another a**hole with an opinion.
|
|
|
|
|
Hahaha! It didn't even occur to me that people would think - quite naturally - that my question was a homework problem! It's been so long since I've been outta school - HAHAHAHA!!
I'm familiar with the standard algorithms (unless a new one has become prominent in the last 10 years) - I was just looking to save myself the hassle with a lil homebrew tool for a game (eve).
Nevermind - thanks for being nice about it tho!
(giggles) Homework.
|
|
|
|
|
sherifffruitfly wrote: question was a homework problem
Typically this type of problem is a homework problem for an algorithms class. Sounds like it isn't in your case.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Yupyup - It's all good - I should have realized how my question would appear to the reader.
|
|
|
|
|
To qualify as a homework problem, it need to have plz, urgent, hlp me, or any variation of a time constrained desperation.
I did find the Hamiltonian Cycle algorithm my Algorithms professor did a few years ago, a real fun one to read back through, but it works
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hahaha - yeah, gamer-speak is definitely typical. Lots of exclamation marks too!!!elevens!!!
|
|
|
|
|
Hi,
I'm just looking to rework part of an application I'm working on that catgorises files by comparing the file path and file name to a lookup table table with multiple string values. Are there any established patterns or algorithms that apply to this scenario?
Something along the lines of how Levenshtien Distance works for comparing two strings, the difference here being that I'm looking at whole words compared to an array of possible matches.
Cheers,
|
|
|
|
|
Why can't you use the Levenshtein distance with words, i.e. increment the cost for a different word instead of a letter? You could even use fractional costs according to how much the words differ.
|
|
|
|
|
Good Day,
Is there a mathematical formula/theory that can tell how much different (in numbers or percentage) two objects are?
Say, I have 2 files, File A and File B, and the formula can tell how much are they different?
Regards,
Ian
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
You need some kind of metric by which to measure the difference. For example, length. Text files could differ by the number of different words if you are comparing an original file with a modified one.
So you need to specify what, exactly, you imply by "differ".
|
|
|
|
|
Well, I will be comparing binary data. A string of 1's and 0's.
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
|
Thank you. But I would be comparing binary data. But this is somewhat along the line of what I need.
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
You still have to define "different".
Say file REF holds 99 bytes of data.
File APPEND holds the same 99 bytes of data followed by one more byte.
File PREFIX holds that same one byte followed by the original 99 bytes.
Now these three files are different. How different are they? That is up to you.
One would say APPEND is very similar to REF.
One could argue PREFIX is completely different, or very similar. Take your pick.
And some parsers would object to "very similar"; if REF represents a valid image (say something
Image.FromFile understands), then APPEND is not likely to be a valid image (as per Image.FromFile).
|
|
|
|
|
I see.
I thought there was a general formula to test for "difference".
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
It depends on what your goal is.
|
|
|
|
|
how about the binary correlation. sum of results where bits equal gives 1 and not equal gives -1 total divided by # bits in file should be useful.
|
|
|
|
|
As I said, it depends what your goal is. If this metric is useful for you, go for it.
|
|
|
|
|
I want to implement FDIST function in c#. Can any one tell me what is the formula to calculate FDIST. its arguments are :-
FDIST(x,degrees_freedom1,degrees_freedom2)
X is the value at which to evaluate the function.
Degrees_freedom1 is the numerator degrees of freedom.
Degrees_freedom2 is the denominator degrees of freedom.
thanks in advance
|
|
|
|
|
Where have you searched so far? Did you look in the excel documentation where it tells you that it implements the F-Distribution? Have you googled F-Distribution?
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
|
hi
I have solved FDIST in C#. now I have to find FINV
Which Returns the inverse of the F probability distribution. If p = FDIST(x,...), then FINV(p,...) = x.
Any idea about this. how to find inverse of the F probability distribution
Syntax
FINV(probability,degrees_freedom1,degrees_freedom2)
Probability is a probability associated with the F cumulative distribution.
Degrees_freedom1 is the numerator degrees of freedom.
Degrees_freedom2 is the denominator degrees of freedom.
thanks in advance
|
|
|
|
|
Hi sumit7034,
I have trying to develop FDIST and FINV function in C# just like what you did. However I don't have any idea how to start with it until I found your post in code project after several days of searching in google. Could you share with me or guide me on this based on your experience?
Do you manage to develop the FINV function?
I read your post mentioning that you manage to resolved the FDIST where the value is as close as what we get from Excel FDIST. Could you share on that?
Thanks. Hope to hear from you soon.
|
|
|
|