Constructor para puntos de red temporales con valor constante
tnpoint(npoint,timestamptz) → tnpointInst
tnpoint(npoint,tstzset) → tnpointDiscSeq
tnpoint(npoint,tstzspan,interp='linear') → tnpointContSeq
tnpoint(npoint,tstzspanset,interp='linear') → tnpointSeqSet
SELECT tnpoint('Npoint(1, 0.5)', timestamptz '2001-01-01'); -- NPoint(1,0.5)@2001-01-01 SELECT tnpoint('Npoint(1, 0.3)', tstzset '{2001-01-01, 2001-01-03, 2001-01-05}'); -- {NPoint(1,0.3)@2001-01-01, NPoint(1,0.3)@2001-01-03, NPoint(1,0.3)@2001-01-05} SELECT tnpoint('Npoint(1, 0.5)', tstzspan '[2001-01-01, 2001-01-02]'); -- [NPoint(1,0.5)@2001-01-01, NPoint(1,0.5)@2001-01-02] SELECT tnpoint('Npoint(1, 0.2)', tstzspanset '{[2001-01-01, 2001-01-03]}', 'step'); -- Interp=Step;{[NPoint(1,0.2)@2001-01-01, NPoint(1,0.2)@2001-01-03]}
Constructor para puntos de red temporal de subtipo secuencia
tnpointSeq(tnpointInst[],interp={'step','linear'},leftInc bool=true,
rightInc bool=true) → tnpointSeq
SELECT tnpointSeq(ARRAY[tnpoint 'Npoint(1, 0.3)@2001-01-01', 'Npoint(1, 0.5)@2001-01-02', 'Npoint(1, 0.5)@2001-01-03']); -- {NPoint(1,0.3)@2001-01-01, NPoint(1,0.5)@2001-01-02, NPoint(1,0.5)@2001-01-03} SELECT tnpointSeq(ARRAY[tnpoint 'Npoint(1, 0.2)@2001-01-01', 'Npoint(1, 0.4)@2001-01-02', 'Npoint(1, 0.5)@2001-01-03']); -- [NPoint(1,0.2)@2001-01-01, NPoint(1,0.4)@2001-01-02, NPoint(1,0.5)@2001-01-03]
Constructor para puntos de red temporal de subtipo conjunto de secuencias
tnpointSeqSet(tnpoint[]) → tnpointSeqSet
tnpointSeqSetGaps(tnpointInst[],maxt=NULL,maxdist=NULL,interp='linear') →
tnpointSeqSet
SELECT tnpointSeqSet(ARRAY[tnpoint '[Npoint(1,0.2)@2001-01-01, Npoint(1,0.4)@2001-01-02, Npoint(1,0.5)@2001-01-03]', '[Npoint(2,0.6)@2001-01-04, Npoint(2,0.6)@2001-01-05]']); /* {[NPoint(1,0.2)@2001-01-01, NPoint(1,0.4)@2001-01-02, NPoint(1,0.5)@2001-01-03], [NPoint(2,0.6)@2001-01-04, NPoint(2,0.6)@2001-01-05]} */ SELECT tnpointSeqSetGaps(ARRAY[tnpoint 'NPoint(1,0.1)@2001-01-01', 'NPoint(1,0.3)@2001-01-03', 'NPoint(1,0.5)@2001-01-05'], '1 day'); -- {[NPoint(1,0.1)@2001-01-01], [NPoint(1,0.3)@2001-01-03], [NPoint(1,0.5)@2001-01-05]}