MobilityDB
1.0
|
Similarity distance for temporal values. More...
#include "general/temporal_similarity.h"
#include <postgres.h>
#include <assert.h>
#include <funcapi.h>
#include <math.h>
#include <access/htup_details.h>
#include <liblwgeom.h>
#include "general/tempcache.h"
#include "general/temporaltypes.h"
#include "general/temporal_util.h"
#include "point/tpoint.h"
#include "point/tpoint_spatialfuncs.h"
Functions | |
static double | tnumberinst_distance (const TInstant *inst1, const TInstant *inst2) |
Compute the distance between two temporal instants. More... | |
static double | tpointinst_distance (const TInstant *inst1, const TInstant *inst2) |
Compute the distance between two temporal instants. More... | |
static double | tinstant_distance (const TInstant *inst1, const TInstant *inst2) |
Compute the distance between two temporal instants. More... | |
static double | tinstantarr_similarity1 (double *dist, const TInstant **instants1, int count1, const TInstant **instants2, int count2, SimFunc simfunc) |
Linear space computation of the similarity distance between two temporal values. More... | |
double | tinstantarr_similarity (const TInstant **instants1, int count1, const TInstant **instants2, int count2, SimFunc simfunc) |
Linear space computation of the similarity distance between two temporal values. More... | |
double | temporal_similarity_internal (Temporal *temp1, Temporal *temp2, SimFunc simfunc) |
Compute the similarity distance between two temporal values (internal function). More... | |
Datum | temporal_similarity (FunctionCallInfo fcinfo, SimFunc simfunc) |
Datum | temporal_frechet_distance (PG_FUNCTION_ARGS) |
Compute the discrete Frechet distance between two temporal values. More... | |
Datum | temporal_dynamic_time_warp (PG_FUNCTION_ARGS) |
Compute the Dynamic Time Match (DTW) distance between two temporal values. More... | |
static Match * | tinstantarr_similarity_path (double *dist, int count1, int count2, int *count) |
Compute the similarity path between two temporal values based on the distance matrix. More... | |
static void | tinstantarr_similarity_matrix1 (double *dist, const TInstant **instants1, int count1, const TInstant **instants2, int count2, SimFunc simfunc) |
Computing the similarity distance between two temporal values using a full matrix. More... | |
Match * | tinstantarr_similarity_matrix (const TInstant **instants1, int count1, const TInstant **instants2, int count2, int *count, SimFunc simfunc) |
Computes the similarity distance between two temporal values. More... | |
static SimilarityPathState * | similarity_path_state_make (Match *path, int size) |
Create the initial state that persists across multiple calls of the function. More... | |
static void | similarity_path_state_next (SimilarityPathState *state) |
Increment the current state to the next warp of the path. More... | |
Match * | temporal_similarity_path_internal (Temporal *temp1, Temporal *temp2, int *count, SimFunc simfunc) |
Compute the similarity path between two temporal values (internal function) More... | |
Datum | temporal_similarity_path (FunctionCallInfo fcinfo, SimFunc simfunc) |
Compute the Dynamic Time Match (DTW) path between two temporal values. More... | |
Datum | temporal_frechet_path (PG_FUNCTION_ARGS) |
Compute the Frechet path between two temporal values. More... | |
Datum | temporal_dynamic_time_warp_path (PG_FUNCTION_ARGS) |
Compute the Dynamic Time Warp (DTW) path between two temporal values. More... | |
Similarity distance for temporal values.
Currently, the discrete Frechet distance and the Dynamic Time Warping (DTW) distance are implemented.