Create Semantic Trajectory Pattern Tree

5 Ansichten (letzte 30 Tage)
ely may
ely may am 9 Dez. 2015
Bearbeitet: ely may am 9 Dez. 2015
Problem: I have to create in Matlab the function CreateNode(semantic, support, children)
Input: Semantic Trajectory Pattern
Output: Semantic Trajectory Pattern Tree
1 root <-- CreateNode(0,0,0)
2 node <-- root
3 foreach semantic S in STP do
4 if \exists a child nc of node semantic trajectory S \include nc.semantic then node <--nc
5 if S is the last element in STP
6 then node.support=STP.support
7 end
8 else
9 child <--CreateNode(S,STP.support,0)
10 node.appendChild(child)
11 node <-- child
12 end
13 end
14 end
15 return root
Can you give me some suggestions to create it? I have no idea how to create a tree in Matlab.

Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by