Jump to content
News about the LabVIEW Wiki! Read more... ×
Wouter

Hamming Weight and Distance

Recommended Posts

VI Name:

Hamming Weight and Hamming Distance

Total VIs:

2

Description:

One VI calculates the hamming weight, the other the hamming distance,

Note:

-

Blockdiagram:

Hamming weight (two versions, one with parallel loop, other without, didn't tested which one was faster)

gallery_17774_56_20603.png

Hamming distance:

gallery_17774_56_23692.png

What are you thoughts on this VI?
  • Would you like to see such a function in OpenG?
  • Can you optimize the code?
  • In which package should it be included?
  • Should it be rejected?

Share this post


Link to post
Share on other sites

Given that the OpenG standard is LV9, we should be posting VIs and snippets in that version. It is important to optimize for that version as well.

Share this post


Link to post
Share on other sites

Given that the OpenG standard is LV9, we should be posting VIs and snippets in that version. It is important to optimize for that version as well.

Yes, please post in LabVIEW 2009 (however, I understand that you may not be able to)

It's just going to make the reviewing process more difficult.

Additionally proposals should be VIs not snippets.

Cheers

-JG

Share this post


Link to post
Share on other sites

Yes, please post in LabVIEW 2009 (however, I understand that you may not be able to)

You can if you use the Code Capture Tool. Something could be said about eating dog food...

  • Like 2

Share this post


Link to post
Share on other sites

You can if you use the Code Capture Tool. Something could be said about eating dog food...

As mentioned above - VIs should be posted, as well as (or opposed) to snippets, for reviews.

Save for Previous would be a better workaround to host the VI.

Snippets are good to view the code in the browser (same as posting an image).

Share this post


Link to post
Share on other sites

You can if you use the Code Capture Tool. Something could be said about eating dog food...

Jon isn't one of the CCT developers. That would be Ton (mostly) and me.

  • Like 1

Share this post


Link to post
Share on other sites

Jon isn't one of the CCT developers. That would be Ton (mostly) and me.

I could be wrong but I didn't take that as what jcarmody was saying (as in the context of the conversation I would not be the one using the CCT to post a snippet, Wouter would be) - I took it more as eating the LAVA community's dog food.

And yes, I am not a CCT developer - all props to Ton and Yair :)

  • Like 1

Share this post


Link to post
Share on other sites

Yes, back on topic...

So the 'hamming distance' is that it counts the non-zero characters?

Perhaps any of these implementations are faster:

post-2399-0-91369700-1325080464.png

Ton

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use.