|
if you treat the rectangle as a cube with a length of zero on one dimension I'm sure you can find multiple implementations online.
--
CleaKO The sad part about this instance is that none of the users ever said anything [about the problem].
Pete O`Hanlon Doesn't that just tell you everything you need to know about users?
|
|
|
|
|
An international team of 18 mathematicians, including two from MIT, has mapped one of the largest and most complicated structures in mathematics. If written out on paper, the calculation describing this structure, known as E8, would cover an area the size of Manhattan.
Article[^].
Lecture slides[^].
Come and see the violence inherent in the system! Help! Help! I'm being repressed!
|
|
|
|
|
those mathematics are SO out of my leage.
what is 1+1 again ?
|
|
|
|
|
11
--
CleaKO The sad part about this instance is that none of the users ever said anything [about the problem].
Pete O`Hanlon Doesn't that just tell you everything you need to know about users?
|
|
|
|
|
"Mathematicians study symmetries in higher dimensions. E8 has 248 dimensions."
Maximilien wrote: those mathematics are SO out of my leage.
Nah, they probably just run 248 nested for
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
|
|
|
|
|
Maximilien wrote: what is 1+1 again ?
10
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
I was about to post the same answer.
|
|
|
|
|
Hi to all, i'm a Biogenetic student and i don't know anything about programming.
Now, i'm looking for someone that can help me to implement some simple phylogenetic algorithms that construct phylogenetic relationship among biological sequences.
There are some kinds of algorithms, such as the follow: Clustering Algorithms, Cladistic methods. I haven't limitation in programming about one algorithm in particular.
What i found is a simple program that draw, in a Windows Form, the output of one o this methods.
Please help me.
|
|
|
|
|
bufugus wrote: Now, i'm looking for someone that can help me to implement some simple phylogenetic algorithms that construct phylogenetic relationship among biological sequences.
There are some kinds of algorithms, such as the follow: Clustering Algorithms, Cladistic methods. I haven't limitation in programming about one algorithm in particular.
Are you asking for a library or are you saying you have them and are asking how to use them?
bufugus wrote: Hi to all, i'm a Biogenetic student and i don't know anything about programming.
You'll need to do something about that if you expect to make a program that works. Unfortunately you can't just copy and paste different code libraries and expect them to work together without writing some code to tie it all together.
What you are trying to do would be like trying to make a new type of car without knowing how cars work. Even if you found companies to make all the parts for you you still would need to know how to assemble them. The same thing goes for programming you need to learn how to program even if only to assemble various code libraries(if you could find libraries for everything, doubtfull).
I would recommend you buy a book or get one from a library to teach you how to program. vb.net is probably one of the easiest languages to learn, but you might also look at c# which is a little more difficult but probably has more libraries written for it. Stay away from c++ though.
|
|
|
|
|
I think he is asking for a programmer who would implement those algorithms for him (and while he doesnt say that, I think visualization as well), to support his biological study/presentation/whatever. Why should he need to learn programming? That's what programmers are for
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
|
|
|
|
|
yeah now that I reread it you may be right. Good point.
|
|
|
|
|
I agree with the point of what you're saying, but not the specific advice.
My advice to any university student/post doc/academic who is looking to learn bioinformatics, I would say "DO NOT learn vb.net. Don't learn C# either." (although c# wouldn't be as bad as vb.net).
Now, I haven't ever used either of those languages, so I don't actually know whether or not they would be better or not than my own recommendations. All I can say is that in the academic bioinformatics world (I don't know what is standard for industry) the languages to learn would be Perl, Python, and C++. Perl is more popular, although I would recommend Python is the better choice (better syntax, better language features, easier to work with, a more promising future) between the two. Any serious bioinformatics student MUST learn one or the other. C++ isn't essential, but you move ahead if you know it well.
For better or worse (I'm not judging today), using C# will set you off in the corner and get you funny looks from the community/your colleagues. Using vb.net will probably get you completely shunned (my boss, who is a mathematician/scientific programmer, spends his free time working on a multi-threaded, garbage collected implementation of lisp -- imagine how he would respond to someone saying their language of choice was vb.net).
In my few years of experience, the academic scientific programming world does not in any way resemble the industrial programming world. I know of a single example of a scientific programming project using c# (which is regarded as a huge mistake by everyone else). Everything else is almost exclusively written in C, C++, Perl, or Python. A couple java programs here and there, too. One law of human behavior is that to be accepted by a group, you'll have to conform to the culture of that group, and that rule applies here. So learn Python or Perl first (but you should choose Python).
I don't have time to do it for anyone, but there are numerous online python tutorials that are specifically written for bioinformatics. I also would highly recommend Biopython[^] as a great library that will help you represent various biological sequence types (amino acid, dna, rna, etc). Finally, and probably most importantly, I would recommend the book Biological Sequence Analysis by Durbin, Eddy, some other guys. It's a fantastic book, and gives a great overview to the field (I dont recall if it discusses clustering specifically, but it talks about everything else). It's a little heavy on the math, but if you're doing statistical analysis of patterns in huge data sets, you'd better accept "a little heavy on the math" as a fact of life.
|
|
|
|
|
Well I am not in the field of bioinfomatics so I will take your word that those other languages are more popular in that field. Although I would never recommend c++ to a new programmer as it is not a begginer's langauge. I have not used perl or python so I can't compare it but I recommended vb.net and c# because they are easy use and have alot of programmers so it makes it easier to find books and online help. But you may have a point if those other languages are used more often in that field.
Nathan A. wrote: Using vb.net will probably get you completely shunned (my boss, who is a mathematician/scientific programmer, spends his free time working on a multi-threaded, garbage collected implementation of lisp -- imagine how he would respond to someone saying their language of choice was vb.net).
I must correct you here. Vb.net and c# have both of those features and alot of others. As does every dotnet language because it is part of the dotnet framework. I know some of the older versions of vb were deficient in some capabilities but that really is not true any more.
|
|
|
|
|
Sounds cool, I wish I had more free time this century.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
|
|
|
|
|
which algorithm will search on a unordered list fastly?
|
|
|
|
|
The luckiest one!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
well... I guess regular iteration will, including a break when it is found.
If you have to do this more than once you could sort it first, because then you could make it a lot faster, but if it's a one time search, just iterate.
<br />
for (int i = 0; i < list.Count; i++)<br />
{<br />
if (list[i] == desiredValue)<br />
{<br />
return i;<br />
}<br />
}<br />
or something similar. for sorts, google BubbleSort or preferably wikipedia.
public object BufferOverFlow<br />
{<br />
__get { return BufferOverFlow; }<br />
__set { BufferOverFlow = value; }<br />
}
|
|
|
|
|
Hi! Please tell me about dithering algorithm clearly. I try to change color depth of bmp 24 bits to 4 bits, but my algorithm is not good...Then someone tell me about dithering, but not clearly, they don't give me an algorithm or clear idea but that's an introduction about dithering...So if you can, please tell me about dithering algorithm clearly.
Thanks and waiting for your replies.
Best regards,
FlytotheBlueSky
|
|
|
|
|
A simple, efficient, and effective solution is error diffusion. The idea is to find the error between the color you want and the color you can produce. You move that error into neighboring pixels. The error accumulates until it reaches the threshold for the next representable color. The effect is surprisingly good.
The algorithm as documented is good for one dimension of color (monochrome). The full color spectrum has three dimensions, so you'll have to apply error diffusion on all three individually. Try it with the red, green, and blue values and see how it works out. If that doesn't look good enough, post again and I'll dig up my HLS color code.
|
|
|
|
|
My answer does not address your question directly, since a good answer has already been given. I just wanted to remind you that if you are doing this to conserve space you will only get a gain of 6x at the expense of a very significant quality loss (at least on photographic images). A compression such as JPEG can give you a gain of 20x without losing nearly as much quality (in fact very little quality loss), and I think that even at 50x compression ratio it will still have better quality than any 4bpp BMP diethering. There is a number of JPEG libraries out there, some highly optimized (like INTEL's).
I hope this helps,
Rogério
|
|
|
|
|
I'm trying to come up with an algorithm that will compare 2 values and pick the lower-value more often, but not always. So if the values are 10 and 50, then the node with 10 will be chosen 4 out of 5 times. Or if the values are 25 and 50 the lower value will be chosen twice as many times as the higher value.
These are just numbers and ratios I've just pulled out of thin air to give you an idea of what I'm trying to do. But I can't seem to come up with anything that makes sense.
If it helps I'm using an AVL tree to store the values and at each node I am comparing the Max and Min value of the leaf nodes. I want to distribute the number of times each leaf node is chosen based on it's value with lower values being chosen more often.
Thanks in advance.
|
|
|
|
|
if you actually meant 5 out of 6 times for the first example...
if (rand(val1+val2) > va1)
choose val2
else choose val1
--
Rules of thumb should not be taken for the whole hand.
|
|
|
|
|
Thanks for the quick response, but if the values are 10 and 50 then: 10 + 50 = 60. And 60 will be chosen more often than 10, and I want the lower value chosen more often. Of course, in this case I could do the opposite. if > val1 then choose val1. I'll experiment with this a bit.
Thanks
|
|
|
|
|
Thanks,
Simply chosing the opposite worked:
<br />
class Class3<br />
{<br />
static void Main(string[] args)<br />
{<br />
Random rand = new Random();<br />
<br />
int cnt1 = 0, cnt2 = 0;<br />
double val1 = 20.223, val2 = 37.882;<br />
int tot = Convert.ToInt32(val1 + val2);<br />
<br />
for (int i = 0; i < 10000; i++)<br />
{<br />
if (rand.Next(tot) > val1)<br />
cnt1++;<br />
else<br />
cnt2++;<br />
}<br />
<br />
Console.WriteLine("Total: " + tot);<br />
Console.WriteLine("Val1 ({0}): {1}", val1, cnt1);<br />
Console.WriteLine("Val2 ({0}): {1}", val2, cnt2);<br />
}<br />
}<br />
The output is consitent no matter which values I choose, the lower value is chosen more than the higher value by a ratio that matches the ratio which matches the values themselves. I'm going to try this next with my AVL tree and watch those results. After this testing I think already I have the answer to my next problem and that was going to be with selecting a random value at each node. But I figure I can get the random value once at the top and use the same result all the way down the tree. I'll try it each way and see which method has better distribution.
Thanks again,
Mark
|
|
|
|
|
|