Skip to content

Conversation

rafaelrojasmiliani
Copy link
Contributor

What does this implement?

This pull request implements a low discrepancy sequence for the generation of sample points in the RRT method.
Low discrepancy sampler are preferred over uniform random distribution because they provide a more evenly distributed sequence of points.
The Sobol sequence was implemented using the code with MIT licence available here.

Additional information

Sorry if I did not create an Issue before, but the pull request was very straight forward. If it is necessary, I can create the issue.

@lgtm-com
Copy link

lgtm-com bot commented Oct 1, 2020

This pull request introduces 1 alert when merging 37c56d2 into 2a5bbdc - view on LGTM.com

new alerts:

  • 1 for Comparison of constants

@lgtm-com
Copy link

lgtm-com bot commented Oct 1, 2020

This pull request introduces 1 alert when merging eba410c into 2a5bbdc - view on LGTM.com

new alerts:

  • 1 for Comparison of constants

Copy link
Owner

@AtsushiSakai AtsushiSakai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi. Thank you for interesting PR. I think the current rrt.py should not be changed, you should add a new python script like "rrt_with_sobol_sampler" or something like that.

@lgtm-com
Copy link

lgtm-com bot commented Oct 25, 2020

This pull request introduces 1 alert when merging 4400786 into 840d6af - view on LGTM.com

new alerts:

  • 1 for Comparison of constants

@lgtm-com
Copy link

lgtm-com bot commented Oct 26, 2020

This pull request introduces 1 alert when merging 9a8bb39 into 840d6af - view on LGTM.com

new alerts:

  • 1 for Comparison of constants

@rafaelrojasmiliani
Copy link
Contributor Author

I forgot to write the test!. I'll write it!

Copy link
Owner

@AtsushiSakai AtsushiSakai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for very interesting PR. I have some comments. And please add a test code for it. PTAL.

import sys
import numpy as np

# from numpy import np.bitwise_xor
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this line if it is not needed.

global seed_save
global v

if 'initialized' is None:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix code scanning warning.

Input, real A(M,N), the matrix.

"""
output = open(filename, 'w')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix code scanning warning.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use with statement? like

with open(filename, 'w') as f:
    for i in range(0, m):

@lgtm-com
Copy link

lgtm-com bot commented Nov 27, 2020

This pull request introduces 1 alert when merging 4b13c91 into 40df009 - view on LGTM.com

new alerts:

  • 1 for Variable defined multiple times

@lgtm-com
Copy link

lgtm-com bot commented Nov 28, 2020

This pull request introduces 1 alert when merging fbebc7d into 40df009 - view on LGTM.com

new alerts:

  • 1 for Variable defined multiple times

Copy link
Owner

@AtsushiSakai AtsushiSakai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for patient. This is the last review. After fix these points, I will merge this PR.

seed = 0

if (seed == 0):
l_var = 1
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.com reports this line as unnecessary code, because l_var is already 1 in line 417.

elif (seed <= seed_save):

seed_save = 0
l_var = 1
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as upper comment.

Input, real A(M,N), the matrix.

"""
output = open(filename, 'w')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use with statement? like

with open(filename, 'w') as f:
    for i in range(0, m):

@lgtm-com
Copy link

lgtm-com bot commented Jan 6, 2021

This pull request introduces 1 alert when merging 6b219a7 into e30696a - view on LGTM.com

new alerts:

  • 1 for Variable defined multiple times

Copy link
Owner

@AtsushiSakai AtsushiSakai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for your patience and your great contribution!!. I will merge it.

@AtsushiSakai AtsushiSakai merged commit 4414256 into AtsushiSakai:master Jan 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants