Skip to content

Conversation

@aneee004
Copy link
Contributor

@aneee004 aneee004 commented Aug 13, 2020

Description of Change

Added a new file heavy_light_decomposition.cpp, which supports point updates and path queries in a tree. The implementation is completely original, and implemented from scratch.

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes: Adding an implementation of Heavy-Light decomposition.

@Panquesito7 Panquesito7 added enhancement New feature or request Proper Documentation Required requested to write the documentation properly requested changes changes have been requested labels Aug 13, 2020
aneee004 and others added 7 commits August 14, 2020 00:43
Co-authored-by: David Leal <halfpacho@gmail.com>
Copy link
Member

@Panquesito7 Panquesito7 left a comment

Choose a reason for hiding this comment

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

Please enable GitHub Actions in your fork of this repository for refined code and formatting.

@aneee004
Copy link
Contributor Author

Please enable GitHub Actions in your fork of this repository for refined code and formatting.

I'm not sure I did it right. Should I get any specific action from the marketplace?

@Panquesito7
Copy link
Member

Never mind, it seems GitHub Actions is already enabled. 😄

@aneee004
Copy link
Contributor Author

Thank you for your time and guidance. Learnt a lot about writing refined code and proper documentation.

Looking forward to contributing more to this repository!

@Panquesito7 Panquesito7 added approved Approved; waiting for merge and removed awaiting modification Do not merge until modifications are made requested changes changes have been requested labels Aug 15, 2020
@Panquesito7 Panquesito7 requested a review from kvedala August 15, 2020 02:10
Copy link
Collaborator

@kvedala kvedala left a comment

Choose a reason for hiding this comment

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

Looks good 👍 Just some doc corrections.

Before you commit, please enable the "GitHub Actions" on this repo. See the image below - only the enable button needs to be clicked, all the settings are already in place.

aneee004 and others added 2 commits August 15, 2020 20:16
Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
@aneee004
Copy link
Contributor Author

Looks good +1 Just some doc corrections.

Before you commit, please enable the "GitHub Actions" on this repo. See the image below - only the enable button needs to be clicked, all the settings are already in place.

I think I already have this enabled.

@kvedala
Copy link
Collaborator

kvedala commented Aug 15, 2020

Looks good +1 Just some doc corrections.
Before you commit, please enable the "GitHub Actions" on this repo. See the image below - only the enable button needs to be clicked, all the settings are already in place.

I think I already have this enabled.

Your code includes "tab-space" indentation which is disabled in the repo. Other formatting options are also not being seen. The Github Actions settings for this repo should have corrected that.

@aneee004
Copy link
Contributor Author

aneee004 commented Aug 15, 2020

Does this look right? (Bear with me, I'm a little new around here).
image
A screenshot of my fork.

Never mind, it seems GitHub Actions is already enabled.

@Panquesito7 said that it was enabled. I'm not sure what the issue is.

@kvedala
Copy link
Collaborator

kvedala commented Aug 15, 2020

Does this look right? (Bear with me, I'm a little new around here).
image

Never mind, it seems GitHub Actions is already enabled.
@Panquesito7 said that it was enabled. I'm not sure what the issue is.

It does look right. And reviewing the commit history, I do see the corrections made by clang-tidy. Maybe I have to manually invoke clang-format on the code.

@kvedala
Copy link
Collaborator

kvedala commented Aug 15, 2020

Meanwhile, if you can open this PR in GitPod using the link in the description above, when you press save, the appropriate fixes will be applied. you can commit therein; thus simplifying the process

}
}
std::vector<std::list<int>>
t_adj; ///> an adjacency list to stores the tree edges
Copy link
Collaborator

@kvedala kvedala Aug 16, 2020

Choose a reason for hiding this comment

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

Suggested change
t_adj; ///> an adjacency list to stores the tree edges
t_adj; ///< an adjacency list to stores the tree edges

The comment is incorrect please note that the correct start tag is ///< and not ///>. Also note that this comment must fit on the same line.
Please make the corrections throughout the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like clang-format is breaking up the lines 😕.

Co-authored-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com>
@kvedala
Copy link
Collaborator

kvedala commented Aug 17, 2020

@aneee004 what I recommended was a suggestion and example. By accepting it as is, the points got repeated in the lines below it. please check lines 327 with lines from 323.

@aneee004
Copy link
Contributor Author

My bad, did not notice it. I'll remove those. Also what about clang-format breaking up the lines?

@Panquesito7 Panquesito7 merged commit 416a3bc into TheAlgorithms:master Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Approved; waiting for merge enhancement New feature or request

3 participants