Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
poo2019numeric
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
francois.hofer
poo2019numeric
Commits
d637b363
Commit
d637b363
authored
5 years ago
by
fefe
Browse files
Options
Downloads
Patches
Plain Diff
Function t()
parent
37ebafdb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/ch/hepia/numeric/Vector.java
+8
-2
8 additions, 2 deletions
src/main/java/ch/hepia/numeric/Vector.java
with
8 additions
and
2 deletions
src/main/java/ch/hepia/numeric/Vector.java
+
8
−
2
View file @
d637b363
...
@@ -19,7 +19,7 @@ final public class Vector {
...
@@ -19,7 +19,7 @@ final public class Vector {
}
}
public
Transposed
t
()
{
public
Transposed
t
()
{
throw
new
UnsupportedOperationException
(
"This feature isn't implemented yet"
);
return
new
Transposed
(
this
);
}
}
public
int
len
()
{
public
int
len
()
{
...
@@ -32,6 +32,10 @@ final public class Vector {
...
@@ -32,6 +32,10 @@ final public class Vector {
void
set
(
int
i
,
double
value
)
{
void
set
(
int
i
,
double
value
)
{
this
.
values
.
set
(
i
,
value
);
this
.
values
.
set
(
i
,
value
);
}
}
private
List
<
Double
>
getValues
(){
return
this
.
values
;
}
public
Vector
add
(
Vector
that
)
{
public
Vector
add
(
Vector
that
)
{
List
<
Double
>
newVec
=
new
ArrayList
<>();
List
<
Double
>
newVec
=
new
ArrayList
<>();
...
@@ -42,7 +46,9 @@ final public class Vector {
...
@@ -42,7 +46,9 @@ final public class Vector {
}
}
public
Vector
mul
(
double
m
)
{
public
Vector
mul
(
double
m
)
{
throw
new
UnsupportedOperationException
(
"This feature isn't implemented yet"
);
//List<Double> newVec = new ArrayList<>();
//for (elem : this.get()){newVec.add(elem*m);}
//return new Vector(newVec);
}
}
public
Vector
sub
(
Vector
that
)
{
public
Vector
sub
(
Vector
that
)
{
...
...
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