blob: cfc028c7fcbc342f8a64398f021c719ae7124467 [file] [log] [blame]
Ruei-sung Linf0f78442012-08-13 19:04:29 -07001/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package android.bordeaux.services;
17
18import android.location.Location;
19import android.text.format.Time;
20import android.util.Log;
21
22import java.lang.Math;
23import java.util.ArrayList;
24
25public class SemanticCluster extends BaseCluster {
26
27 public static String TAG = "SemanticCluster";
28
29 private String mSemanticId;
30
31 public SemanticCluster(LocationCluster cluster, long avgInterval, long semanticIndex) {
32 mCenter = new double[3];
33 for (int i = 0; i < 3; ++i) {
34 mCenter[i] = cluster.mCenter[i];
35 }
36 mDuration = cluster.mDuration;
37 mAvgInterval = avgInterval;
38
39 setSemanticId(semanticIndex);
40 }
41
42 public String getSemanticId() {
43 return mSemanticId;
44 }
45
46 private void setSemanticId(long index) {
47 mSemanticId = "cluser: " + String.valueOf(index);
48 }
49}