Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
DDC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GOKA HARSHITH
DDC
Commits
b020bd39
Commit
b020bd39
authored
Jun 30, 2016
by
Varshith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Altering of DTW values
parent
baee4c7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
app/src/main/java/com/example/harshith/ddc/DynamicQueue.java
app/src/main/java/com/example/harshith/ddc/DynamicQueue.java
+11
-5
No files found.
app/src/main/java/com/example/harshith/ddc/DynamicQueue.java
View file @
b020bd39
package
com.example.harshith.ddc
;
import
java.
lang.reflect.Array
;
import
java.util.
Queue
;
import
java.
util.ArrayList
;
import
java.util.
Iterator
;
class
DynamicQueue
{
public
int
noOfSlots
=
2000
;
public
int
noOfGestures
;
public
DynamicGesture
[]
gesture
;
public
in
t
[][]
dtwGap
;
public
ArrayLis
t
[][]
dtwGap
;
public
Live
[]
liveElement
;
public
boolean
[][]
shortlist
;
public
int
latestElement
=
0
;
public
int
foremostElement
=
0
;
public
int
[]
threshold
;
public
double
alterFactor
=
-
1
;
public
DynamicQueue
(
DynamicGesture
[]
gest
,
int
[]
threshold
){
gesture
=
gest
.
clone
();
...
...
@@ -33,7 +34,12 @@ class DynamicQueue{
}
}
dtwGap
=
new
int
[
noOfSlots
][
noOfGestures
];
dtwGap
=
new
ArrayList
[
noOfSlots
][
noOfGestures
];
for
(
int
i
=
0
;
i
<
noOfSlots
;
i
++)
{
for
(
int
j
=
0
;
j
<
noOfGestures
;
j
++){
dtwGap
[
i
][
j
]
=
new
ArrayList
();
}
}
}
public
void
overflowCheck
(){
...
...
@@ -124,7 +130,7 @@ class DynamicQueue{
int
[][]
gestarraytemp
=
validSensorArrayComp
(
i
);
x
.
arrayInput
(
gestarraytemp
,
arraytemp
);
dtwGap
[
slotNo
][
i
]
=
x
.
sdtwDistance
(
);
dtwGap
[
slotNo
][
i
]
.
add
(
Math
.
max
(
0.0
,
((
double
)(
x
.
sdtwDistance
()
+
dtwGap
[
slotNo
][
i
].
size
()*
alterFactor
))
)
);
}
for
(
int
i
=
0
;
i
<
noOfGestures
;
i
++)
{
if
(
dtwGap
[
slotNo
][
i
]>=
threshold
[
i
])
shortlist
[
slotNo
][
i
]
=
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment