Create Semantic Trajectory Pattern Tree
5 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!