Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds remove methods for all API classes #347

Merged
merged 3 commits into from
Feb 18, 2025

Conversation

DrPaulSharp
Copy link
Collaborator

Closes #340


obj.varTable(row, :) = [];

indices = sort(indices, 'descend');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since the indices are sorted here, the sort on line 60 is not needed. Also the for loop below is not needed since indices is sorted.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If the input is a cell array of multiple row names, the resulting indices array will not be sorted, so it is needed here. There's also no guarantee that a list of rows provided is valid so I think the for loop is still needed too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ahh, sorry. Misread here. I'll take out the sort on line 60 too.

end
end

obj.varTable(indices, :) = [];
Copy link
Collaborator

Choose a reason for hiding this comment

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

This line should work with unsorted indices so maybe the sort can be removed

@DrPaulSharp DrPaulSharp merged commit 34375c2 into RascalSoftware:master Feb 18, 2025
5 checks passed
@DrPaulSharp DrPaulSharp deleted the delete branch February 18, 2025 11:55
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.

Make setContrast accept the model also and update remove method in project class
2 participants