Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MH-Tree
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
disa
public
Hulls
MH-Tree
Commits
bfeaca16
There was an error fetching the commit references. Please try again later.
Verified
Commit
bfeaca16
authored
3 years ago
by
David Procházka
Browse files
Options
Downloads
Patches
Plain Diff
ADD: validation checks on MH-Tree params
parent
48c20dbd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mhtree/MHTree.java
+16
-0
16 additions, 0 deletions
src/mhtree/MHTree.java
with
16 additions
and
0 deletions
src/mhtree/MHTree.java
+
16
−
0
View file @
bfeaca16
...
@@ -288,6 +288,22 @@ public class MHTree extends Algorithm implements Serializable {
...
@@ -288,6 +288,22 @@ public class MHTree extends Algorithm implements Serializable {
private
Node
root
;
private
Node
root
;
public
Builder
(
List
<
LocalAbstractObject
>
objects
,
int
bucketCapacity
,
int
arity
)
{
public
Builder
(
List
<
LocalAbstractObject
>
objects
,
int
bucketCapacity
,
int
arity
)
{
if
(
objects
==
null
)
{
throw
new
NullPointerException
(
"List of objects is null"
);
}
if
(
objects
.
size
()
<
3
)
{
throw
new
IllegalArgumentException
(
"Number of objects cannot by smaller than 3"
);
}
if
(
bucketCapacity
<
3
)
{
throw
new
IllegalArgumentException
(
"Bucket capacity cannot be smaller than 3"
);
}
if
(
arity
<
2
)
{
throw
new
IllegalArgumentException
(
"Arity cannot be smaller than 2"
);
}
this
.
objects
=
objects
;
this
.
objects
=
objects
;
this
.
bucketCapacity
=
bucketCapacity
;
this
.
bucketCapacity
=
bucketCapacity
;
this
.
arity
=
arity
;
this
.
arity
=
arity
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment