Files
secondo/Tests/Testspecs/tempunitalg/tempunit_uni.test
2026-01-23 17:03:45 +08:00

1469 lines
55 KiB
Plaintext

#This file is part of SECONDO.
#
#Copyright (C) 2004, University in Hagen, Department of Computer Science,
#Database Systems for New Applications.
#
#SECONDO is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2 of the License, or
#(at your option) any later version.
#
#SECONDO is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with SECONDO; if not, write to the Free Software
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#########################################################################
# Testing the TemporalUnitAlgebra
#
# Here: testing operators on unit datatypes
#
# Written Sept 2006 by Chrstian Duentgen
#
# run with : TestRunner -c SecondoConfig.ini < temporalunit.test
#########################################################################
########################
# set up test database #
########################
# clean up what may be left over from e.g. a segfault
delete database tempunittest;
#setup
create database tempunittest;
open database tempunittest;
let up1 = [const upoint value (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (2000.0 2000.0 1000.0 1000.0))];
let up2 = [const upoint value (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (1000.0 1000.0 2000.0 2000.0))];
let up3 = [const upoint value undefined];
let up4 = [const upoint value (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (0.0 0.0 0.0 1000.0))];
let up5 = [const upoint value (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (0.0 0.0 0.0 -1000.0))];
let up6 = [const upoint value (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (1500.0 1500.0 1500.0 1500.0))];
let up7 = [const upoint value (("2000-01-02-23:50" "2000-01-03-00:10" TRUE TRUE) (1000.0 1000.0 2000.0 2000.0))];
let up8 = [const upoint value (("2003-01-01-12:00" "2003-01-01-12:20" TRUE TRUE) (1000.0 1000.0 2000.0 2000.0))];
let up9 = [const upoint value (("2003-11-20-05:30" "2003-11-20-06:30" TRUE TRUE) (0.0 0.0 0.0 0.0))];
let mp1 = [const mpoint value ((("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (-100.0 -100.0 100.0 100.0)))];
let mp2 = [const mpoint value ((("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (100.0 100.0 -100.0 -100.0)))];
let p = [const point value (1500.0 1500.0)];
let p1 = [const point value (2000.0 2000.0)];
let p2 = [const point value (1000.0 1000.0)];
let p3 = [const point value undefined];
let ui1 = [const uint value (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) 1500)];
let ui2 = [const uint value (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) 1000)];
let ui3 = [const uint value undefined];
let ui4 = [const uint value (("2003-11-20-06:30" "2003-11-20-07:30" TRUE FALSE) 1000)];
let ci = [const int value 1000];
let i1 = [const int value 100];
let i3 = [const int value undefined];
let ur1 = [const ureal value (("2000-01-01-00:00:00.000" "2000-01-05-00:00:00.000" TRUE TRUE) (1.0 0.0 -1.0 FALSE))];
let ur2 = [const ureal value (("2000-01-02-23:59:59.900" "2000-01-03-00:00:00.100" TRUE TRUE) (-1.0 -1.0 -1.0 FALSE))];
let ur3 = [const ureal value undefined];
let ur4 = [const ureal value (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (1.0 1.0 1.0 TRUE))];
let ur5 = [const ureal value (("2000-01-01-00:00:00.000" "2000-01-05-00:00:00.000" TRUE TRUE) (1.0 0.0 -1.0 FALSE))];
let ur6 = [const ureal value (("2000-01-01-00:00:00.000" "2000-01-05-00:00:00.000" TRUE TRUE) (-1.0 0.0 1.0 FALSE))];
let ur7 = [const ureal value (("2000-01-01-00:00:00.000" "2000-01-05-00:00:00.000" TRUE TRUE) (-1.0 0.0 1.0 TRUE))];
let r = [const real value 0.0];
let r1 = [const real value 2.0];
let r2 = [const real value -3.0];
let r3 = [const real value undefined];
let rundef = [const real value undefined];
let ubool1 = [const ubool value (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) TRUE)];
let ubool2 = [const ubool value (("2003-11-20-05:00" "2003-11-20-06:00" TRUE TRUE) TRUE)];
let ubool3 = [const ubool value undefined];
let ubool4 = [const ubool value (("2003-11-20-06:30" "2003-11-20-06:45" TRUE FALSE) FALSE)];
let line1 = [const line value ((1500.0 1000.0 1500.0 2000.0))];
let line2 = [const line value ((1010 1010 1100 1100)(1100 1100 1200 1000)(1200 1000 1600 1000)(1600 1000 1600 2010)(1600 2010 1700 1100)(1700 1100 1800 1800)(1800 1800 2300 2300))];
let line3 = [const line value ()];
let line4 = [const line value ((1000 1000 2000 2000))];
let line5 = [const line value ((500 500 1200 1200)(1200 1200 1800 1800))];
let line6 = [const line value ((500 500 1200 1200)(1100 1100 2100 2100))];
let ureg = [const uregion value (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE)((((1400.499713882954 1490.015358663125 1600.499713882954 1690.015358663125) (1400.410767539451 1509.0545446003 1600.410767539451 1709.0545446003) (1403.931916059765 1527.765504642486 1603.931916059765 1727.765504642486) (1410.935518333768 1545.469969271216 1610.935518333768 1745.469969271216) (1421.167694820742 1561.526154277057 1621.167694820742 1761.526154277057) (1434.257530644965 1575.352025341741 1634.257530644965 1775.352025341741) (1449.73052120479 1586.446396695628 1649.73052120479 1786.446396695628) (1467.02577289387 1594.407099027316 1667.02577289387 1794.407099027316) (1485.516335410969 1598.945558061352 1685.516335410969 1798.945558061352) (1504.531928615123 1599.897255332804 1704.531928615123 1799.897255332804) (1523.383240081058 1597.227691957135 1723.383240081058 1797.227691957135) (1541.386912572071 1591.033639209645 1741.386912572071 1791.033639209645) (1557.890315638227 1581.539630581126 1757.890315638227 1781.539630581126) (1572.295203373088 1569.089822472227 1772.295203373088 1769.089822472227) (1584.079400738847 1554.135518575113 1784.079400738847 1754.135518575113) (1592.815732333772 1537.218810181756 1792.815732333772 1737.218810181756) (1598.187507436988 1518.952925455227 1798.187507436988 1718.952925455227) (1600.0 1500.0 1800.0 1700.0) (1598.360304441623 1481.965297059525 1798.360304441623 1681.965297059525) (1593.159427434283 1463.650019530727 1793.159427434283 1663.650019530727) (1584.581535038961 1446.652423387253 1784.581535038961 1646.652423387253) (1572.937574579115 1431.588668961085 1772.937574579115 1631.588668961085) (1558.649637889493 1419.004815109592 1758.649637889493 1619.004815109592) (1542.23566054991 1409.357024663172 1742.23566054991 1609.357024663172) (1524.290646797515 1402.995028590498 1724.290646797515 1602.995028590498) (1505.465100711695 1400.149448302921 1705.465100711695 1600.149448302921) (1486.441445537954 1400.923435662616 1686.441445537954 1600.923435662616) (1467.909285946766 1405.288933742917 1667.909285946766 1605.288933742917) (1450.540409966842 1413.087693887736 1650.540409966842 1613.087693887736) (1434.964436769013 1424.037012201808 1634.964436769013 1624.037012201808) (1421.745993064933 1437.739977524848 1621.745993064933 1637.739977524848) (1411.364245472766 1453.699859402071 1611.364245472766 1653.699859402071) (1404.195530798551 1471.338114489298 1604.195530798551 1671.338114489298)))))]
let spiral = [const region value ((( (1200.0 1300.0) (1300.0 1300.0) (1300.0 1400.0) (1100.0 1400.0) (1100.0 1100.0) (1500.0 1100.0) (1500.0 1500.0) (1600.0 1500.0) (1600.0 1000.0) (1000.0 1000.0) (1000.0 1500.0) (1400.0 1500.0) (1400.0 1200.0) (1200.0 1200.0) )((1025.0 1025.0)(1075.0 1025.0)(1075.0 1075.0)(1025.0 1075.0)))(((1600.0 1600.0)(1700.0 1600.0)(1700.0 1700.0)(1600.0 1700.0))) (((1035.0 1035.0)(1065.0 1035.0)(1065.0 1065.0)(1035.0 1065.0))) )]
let uspiral = units(move(up1 feed the_mvalue, spiral)) transformstream extract[Elem]
(create ten : (rel(tuple((No int)))));
(update ten := ((rel(tuple((No int))))((1)(2)(3)(4)(5)(6)(7)(8)(9)(10))));
restore zug5 from '$(SECONDO_BUILD_DIR)/Tests/Testspecs/tempunitalg/zug5';
let LinesRel = units(zug5) use[fun(ZZ:STREAMELEM) trajectory(ZZ)] transformstream consume;
let inst1 = [const instant value "2003-11-20-06:00"];
let inst2 = [const instant value "2003-11-20-07:00"];
let inst3 = [const instant value undefined];
##################
# makemvalue #
##################
#testcase makemvalue EMPTY INPUT
#yields (mpoint ())
query units([const mpoint value ()]) transformstream makemvalue[Elem]
#testcase makemvalue UNDEF in INPUT
#yields (mpoint ())
query [const upoint value undefined] feed transformstream makemvalue[Elem]
#testcase makemvalue SORTED INPUT
#yields @$(SECONDO_BUILD_DIR)/Tests/Testspecs/tempunitalg/zug5AsResult
query units(zug5) transformstream makemvalue[Elem]
#testcase makemvalue SHUFFLED INPUT
#yields @$(SECONDO_BUILD_DIR)/Tests/Testspecs/tempunitalg/zug5AsResult
query units(zug5) transformstream extend[No: randint(1000)] sortby[No asc] makemvalue[Elem]
##################
# the_mvalue #
##################
#testcase the_mvalue EMPTY INPUT
#yields (mpoint ())
query units([const mpoint value ()]) the_mvalue
#testcase the_mvalue UNDEF in INPUT
#yields (mpoint ())
query [const upoint value undefined] feed the_mvalue
#testcase the_mvalue SORTED INPUT
#yields @$(SECONDO_BUILD_DIR)/Tests/Testspecs/tempunitalg/zug5AsResult
query units(zug5) the_mvalue
#testcase the_mvalue SHUFFLED INPUT
#yields @$(SECONDO_BUILD_DIR)/Tests/Testspecs/tempunitalg/zug5AsResult
query units(zug5) transformstream extend[No: randint(1000)] sortby[No asc] project[Elem] transformstream the_mvalue
##################
# unit operators #
##################
#tolerance_real 0.001
#testcase deftime
#tolerance_real 0.001
#yields (periods (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE)))
query deftime(up1)
#testcase deftime_undef
#yields (periods undefined)
query deftime(up3)
#testcase atinstant up1
#yields (ipoint ("2003-11-20-06:30" (1500.0 1500.0)))
query up1 atinstant [const instant value "2003-11-20-06:30"]
#testcase atinstant undef_upoint
#yields (ipoint undefined)
query up3 atinstant [const instant value "2003-11-20-06:30"]
#testcase atinstant upoint undef_instant
#yields (ipoint undefined)
query up1 atinstant [const instant value undef]
#testcase atperiods upoint
#yields ((rel (tuple ( (Elem upoint)))) ( ( ( ("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) (1916.666666666667 1916.666666666667 1833.333333333333 1833.333333333333))) ( ( ("2003-11-20-06:50" "2003-11-20-06:55" TRUE FALSE) (1166.666666666667 1166.666666666667 1083.333333333334 1083.333333333334)))))
query (up1 atperiods [const periods value ( ("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE)
("2003-11-20-06:50" "2003-11-20-06:55" TRUE FALSE)) ] ) transformstream consume
#testcase atperiods undef_upoint
#yields ((rel (tuple ( (Elem upoint)))) ( ))
query (up3 atperiods [const periods value ( ("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) ("2003-11-20-06:50" "2003-11-20-06:55" TRUE FALSE)) ] ) transformstream consume
# as there are no undef-periods values, we use empt-periods here:
#testcase atperiods upoint undef_periods
#yields ((rel (tuple ( (Elem upoint)))) ( ))
query (up1 atperiods [const periods value ( ) ] ) transformstream consume
#testcase initial_up
#yields (ipoint ("2003-11-20-06:00" (2000.0 2000.0)))
query initial(up1)
#testcase initial_up undef
#yields (ipoint undefined)
query initial(up3)
#testcase initial stream
#yields (ipoint ("2003-11-20-06:00" (11068.0 12895.0)))
query initial(units(zug5) transformstream extend[Zz: randint(500)] sortby[Zz asc] remove[Zz] transformstream)
#testcase final_up
#yields (ipoint ("2003-11-20-07:00" (1000.0 1000.0)))
query final(up1)
#testcase final_up undef
#yields (ipoint undefined)
query final(up3)
#testcase final stream
#yields (ipoint ("2003-11-20-06:34:10" (25965.0 15030.0)))
query final(units(zug5) transformstream extend[Zz: randint(500)] sortby[Zz asc] remove[Zz] transformstream)
#testcase present_I
#yields (bool TRUE)
query (up1 present [const instant value "2003-11-20-06:33"])
#testcase present_I instant-undef
#yields (bool undefined)
query (up1 present [const instant value undef])
#testcase present_I upoint-undef
#yields (bool undefined)
query (up3 present [const instant value "2003-11-20-06:33"])
#testcase present_P
#yields (bool TRUE)
query (up1 present [const periods value ( ("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) ("2003-11-20-06:50" "2003-11-20-06:55" TRUE FALSE)) ])
#testcase at_up_p1
#yields (mpoint ( ( ("2003-11-20-06:30" "2003-11-20-06:30" TRUE TRUE) (1500.0 1500.0 1500.0 1500.0))))
query (up2 at p) the_mvalue
#testcase at_up_p2
#yields (mpoint ( ( ("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (1500.0 1500.0 1500.0 1500.0))))
query (up6 at p) the_mvalue
#testcase at_undef-upoint_p1
#yields (mpoint ())
query (up3 at p) the_mvalue
#testcase at_up_undef-point
#yields (mpoint ())
query (up2 at p3) the_mvalue
#testcase at_up_rg
#yields ((rel (tuple ((Elem upoint))))(((("2003-11-20-06:18" "2003-11-20-06:24" TRUE TRUE)(1700.0 1700.0 1600.0 1600.0)))((("2003-11-20-06:30" "2003-11-20-06:30" TRUE TRUE)(1500.0 1500.0 1500.0 1500.0)))((("2003-11-20-06:36" "2003-11-20-06:48" TRUE TRUE)(1400.0 1400.0 1200.0 1200.0)))((("2003-11-20-06:54" "2003-11-20-06:55:30" TRUE TRUE)(1100.0 1100.0 1075.0 1075.0)))((("2003-11-20-06:56:06" "2003-11-20-06:57:54" TRUE TRUE)(1065.0 1065.0 1035.0 1035.0)))(( ("2003-11-20-06:58:30" "2003-11-20-07:00" TRUE FALSE) (1025.0 1025.0 1000.0 1000.0)))))
query (up1 at spiral) transformstream consume
#testcase passes TRUE
#yields (bool TRUE)
query ( up2 passes p)
#testcase passes FALSE
#yields (bool FALSE)
query ( up4 passes p)
#testcase passes undef-upoint p
#yields (bool undefined)
query ( up3 passes p)
#testcase passes up2 undef-point
#yields (bool undefined)
query ( up2 passes p3)
#testcase velocity_up
#yields (upoint (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (-0.2777777777772725 -0.2777777777772725 -0.2777777777772725 -0.2777777777772725)))
query velocity(up1)
#testcase velocity_up 2
#yields (upoint (("2003-11-20-06:00" "2003-11-20-06:01" TRUE TRUE) (16.66667 0.0 16.66667 0.0)))
query velocity([const upoint value(("2003-11-20-06:00" "2003-11-20-06:01" TRUE TRUE) (0.0 0.0 1000.0 0.0))])
#testcase velocity undef-upoint
#yields (upoint undefined)
query velocity(up3)
#testcase derivable_ur4
#yields (ubool ( ("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) FALSE))
query derivable(ur4)
#testcase derivable_ur2
#yields (ubool ( ("2000-01-02-23:59:59.900" "2000-01-03-00:00:00.100" TRUE TRUE) TRUE))
query derivable(ur2)
#Testcase derivative_ur4 (radix)
#yields (ureal undefined)
query derivative(ur4)
#Testcase derivative_ur3 (undefined)
#yields (ureal undefined)
query derivative(ur3)
#testcase derivative_ur2 (defined)
#yields (ureal ( ("2000-01-02-23:59:59.900" "2000-01-03-00:00:00.100" TRUE TRUE) (0.0 -2.0 -1.0 FALSE)))
query derivative(ur2)
#testcase atmax_uconst
#yields (uint ( ("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) 1500))
query atmax(ui1)
#testcase atmin_uconst
#yields (uint ( ("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) 1000))
query atmin(ui2)
#testcase distance_ui3_i
#yields (ureal undefined)
query distance(ui3, i1)
#testcase distance_ui1_i
#yields (ureal ( ("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (0.0 0.0 1400.0 FALSE)))
query distance(ui1, i1)
#testcase distance_i_ui3
#yields (ureal undefined)
query distance(i1, ui3)
#testcase distance_ur_ur def def
#yields (mreal ( ( ("2000-01-02-23:59:59.900" "2000-01-03-00:00:00.100" TRUE TRUE) (2.0 4.999997685185186 3.999995370371709 FALSE))))
query distance(ur1, ur2) the_mvalue
#testcase distance_ur_ur undef def
#yields (int 0)
query distance(ur3, ur1) count
#testcase distance_ur_ur def unfdef
#yields (int 0)
query distance(ur2, ur3) count
#testcase distance_ur_ur radix2
#yields (int 0)
query distance(ur6, ur7) count
#testcase distance_ur_ur radix1
#yields (int 0)
query distance(ur7, ur6) count
#testcase distance_ur_ur radix12
#yields (int 0)
query distance(ur7, ur7) count
#testcase distance_ur_r
#yields (mreal ( ( ("2000-01-01" "2000-01-02" TRUE FALSE) (-1.0 -0.0 1.0 FALSE)) ( ("2000-01-02" "2000-01-05" TRUE TRUE) (1.0 2.0 0.0 FALSE))))
query distance( ur1, 0.0 ) the_mvalue
#testcase distance_u_ur 1
#yields (mreal ( ( ("2000-01-01" "2000-01-02" TRUE FALSE) (-1.0 -0.0 1.0 FALSE)) ( ("2000-01-02" "2000-01-05" TRUE TRUE) (1.0 2.0 0.0 FALSE))))
query distance( 0.0, ur1 ) the_mvalue
#testcase distance_ur_r 2
#yields (mreal ( ( ("2000-01-01" "2000-01-02-09:56:28.052" TRUE FALSE) (-1.0 -0.0 2.0 FALSE)) ( ("2000-01-02-09:56:28.052" "2000-01-05" TRUE TRUE) (1.0 2.82842712962963 6.906226701630658e-09 FALSE))))
query distance( ur1, 1.0 ) the_mvalue
#testcase distance_ur_r 3
#yields (mreal ( ( ("2000-01-01" "2000-01-05" TRUE TRUE) (1.0 0.0 0.0 FALSE))))
query distance( ur1, -1.0 ) the_mvalue
#testcase atmax_ureal ur1
#yields ((rel (tuple ((Elem ureal))))(((("2000-01-05" "2000-01-05" TRUE TRUE)(0.0 0.0 15.0 FALSE)))))
query atmax(ur1) transformstream consume
#testcase atmax_ureal ur2
#yields ((rel (tuple ( (Elem ureal)))) (((("2000-01-02-23:59:59.900" "2000-01-02-23:59:59.900" TRUE TRUE) (0.0 0.0 -1.0 FALSE)))))
query atmax(ur2) transformstream consume
#testcase atmax_ureal ur3
#yields (int 0)
query atmax(ur3) count
#testcase atmin_ureal ur1
#yields ((rel (tuple ( (Elem ureal)))) (((("2000-01-01" "2000-01-01" TRUE TRUE) (0.0 0.0 -1.0 FALSE)))))
query atmin(ur1) transformstream consume
#testcase atmin_ureal ur2
#yields ((rel (tuple ( (Elem ureal)))) (((("2000-01-03-00:00:00.100" "2000-01-03-00:00:00.100" TRUE TRUE) (0.0 0.0 -1.000002314820173 FALSE)))))
query atmin(ur2) transformstream consume
#testcase atmin_ureal ur3
#yields (int 0)
query atmin(ur3) count
#testcase at_ureal ur1 def 1
#yields ((rel (tuple ( (Elem ureal)))) (((("2000-01-01" "2000-01-01" TRUE TRUE) (0.0 0.0 -1.0 FALSE)))))
query (ur1 at [const real value -1.0]) transformstream consume
#testcase at_ureal ur1 def 2
#yields ((rel (tuple ( (Elem ureal)))) (((("2000-01-03" "2000-01-03" TRUE TRUE) (0.0 0.0 3.0 FALSE))) ))
query (ur1 at [const real value 3.0]) transformstream consume
#testcase at_ureal ureal-undef def
#yields (int 0)
query (ur3 at [const real value 3.0]) count
#testcase at_ureal ur1 real-undef
#yields (int 0)
query (ur1 at rundef) count
#testcase present_uconst_instant positive
#yields (bool TRUE)
query ui1 present [const instant value "2003-11-20-06:33"]
#testcase present_uconst_instant negative
#yields (bool FALSE)
query ui1 present [const instant value "2003-11-20-07:00"]
#testcase present_uconst_instant inst-undef
#yields (bool undefined)
query ui1 present [const instant value undef]
#testcase present_uconst_instant unit-undef
#yields (bool undefined)
query ui3 present [const instant value "2003-11-20-06:33"]
#testcase present_ureal_instant positive
#yields (bool TRUE)
query ur4 present [const instant value "2003-11-20-06:33"]
#testcase present_ureal_instant negative
#yields (bool FALSE)
query ur4 present [const instant value "2003-11-20-07:00"]
#testcase present_ureal_instant inst-undef
#yields (bool undefined)
query ur4 present [const instant value undef]
#testcase present_ureal_instant unit-undef
#yields (bool undefined)
query ur3 present [const instant value "2003-11-20-06:33"]
#testcase present_uconst_periods TRUE
#yields (bool TRUE)
query (ui1 present [const periods value ( ("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) ("2003-11-20-06:50" "2003-11-20-06:55" TRUE FALSE)) ])
#testcase present_uconst_periods FALSE
#yields (bool TRUE)
query (ui1 present [const periods value ( ("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) ("2003-11-20-06:50" "2003-11-20-07:00" TRUE TRUE)) ])
#testcase present_uconst_periods uconst-undef
#yields (bool undefined)
query (ui3 present [const periods value ( ("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) ("2003-11-20-06:50" "2003-11-20-07:00" TRUE TRUE)) ])
#testcase present_uconst_periods periods-empty
#yields (bool undefined)
query (ui3 present [const periods value ( ) ])
#testcase present_ureal_periods TRUE
#yields (bool TRUE)
query (ur4 present [const periods value ( ("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) ("2003-11-20-06:50" "2003-11-20-06:55" TRUE FALSE)) ])
#testcase present_ureal_periods FALSE
#yields (bool TRUE)
query (ur4 present [const periods value ( ("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) ("2003-11-20-06:50" "2003-11-20-07:00" TRUE TRUE)) ])
#testcase present_ureal_periods undef-ureal
#yields (bool undefined)
query (ur3 present [const periods value ( ("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) ("2003-11-20-06:50" "2003-11-20-06:55" TRUE FALSE)) ])
#testcase present_ureal_periods empty-periods
#yields (bool undefined)
query (ur3 present [const periods value ( ) ])
#testcase atinstant_uconst
#yields (iint ("2003-11-20-06:33" 1500) )
query ui1 atinstant [const instant value "2003-11-20-06:33"]
#testcase atinstant_uconst uconst-undef
#yields (iint undefined)
query ui3 atinstant [const instant value "2003-11-20-06:33"]
#testcase atinstant_uconst instant-undef
#yields (iint undefined)
query ui1 atinstant [const instant value undef]
#testcase atinstant_ureal DEF
#yields (ireal ("2000-01-03" 3.0) )
query ur1 atinstant [const instant value "2000-01-03-00:00"]
#testcase atinstant_ureal UNDEF
#yields (ireal undefined)
query ur1 atinstant [const instant value "1999-01-03-00:00"]
#testcase atinstant_ureal ureal-undef
#yields (ireal undefined)
query ur3 atinstant [const instant value "2000-01-03-00:00"]
#testcase atinstant_ureal instant-undef
#yields (ireal undefined)
query ur1 atinstant [const instant value undef]
#testcase atperiods_uconst BOTHINSIDE
#yields ((rel (tuple ( (Elem uint)))) (((("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) 1500)) ((("2003-11-20-06:50" "2003-11-20-06:55" TRUE FALSE) 1500) ) ) )
query (ui1 atperiods [const periods value ( ("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) ("2003-11-20-06:50" "2003-11-20-06:55" TRUE FALSE)) ]) transformstream consume
#testcase atperiods_uconst ONEAHALFINSIDE
#yields ((rel (tuple ( (Elem uint)))) (((("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) 1500)) ((("2003-11-20-06:50" "2003-11-20-07:00" TRUE FALSE) 1500) ) ) )
query (ui1 atperiods [const periods value ( ("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) ("2003-11-20-06:50" "2003-11-20-08:55" TRUE TRUE)) ]) transformstream consume
#testcase atperiods_uconst ONEINSIDE
#yields ((rel (tuple ( (Elem uint)))) (((("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) 1500)) ) )
query (ui1 atperiods [const periods value ( ("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) ("2003-11-20-08:50" "2003-11-20-09:55" TRUE TRUE)) ]) transformstream consume
#testcase atperiods_uconst OUTSIDE
#yields ((rel (tuple ( (Elem uint)))) () )
query (ui1 atperiods [const periods value ( ("2001-11-20-06:05" "2002-11-20-06:10" TRUE FALSE) ("2004-11-20-06:50" "2005-11-20-07:00" TRUE TRUE)) ]) transformstream consume
#testcase atperiods_uconst uconst-undef
#yields ((rel (tuple ( (Elem uint)))) ( ) )
query (ui3 atperiods [const periods value ( ("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) ("2003-11-20-06:50" "2003-11-20-06:55" TRUE FALSE)) ]) transformstream consume
#testcase atperiods_uconst periods-empty
#yields ((rel (tuple ( (Elem uint)))) ( ) )
query (ui1 atperiods [const periods value ( ) ]) transformstream consume
#testcase atperiods_ureal BOTHINSIDE
#yields ((rel (tuple ( (Elem ureal)))) (((("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) (1.0 1.006944444444444 1.003484278549383 TRUE))) ((("2003-11-20-06:50" "2003-11-20-06:55" FALSE TRUE) (1.0 1.069444444444444 1.035927854938272 TRUE)) ) ) )
query (ur4 atperiods [const periods value ( ("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) ("2003-11-20-06:50" "2003-11-20-06:55" FALSE TRUE)) ]) transformstream consume
#testcase atperiods_ureal ONEAHALFINSIDE
#yields ((rel (tuple ( (Elem ureal)))) (((("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) (1.0 1.006944444444444 1.003484278549383 TRUE))) ((("2003-11-20-06:50" "2003-11-20-07:00" TRUE FALSE) (1.0 1.069444444444444 1.035927854938272 TRUE)) ) ) )
query (ur4 atperiods [const periods value ( ("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) ("2003-11-20-06:50" "2003-11-20-08:55" TRUE TRUE)) ]) transformstream consume
#testcase atperiods_ureal ONEINSIDE
#yields ((rel (tuple ( (Elem ureal)))) (((("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) (1.0 1.006944444444444 1.003484278549383 TRUE))) ) )
query (ur4 atperiods [const periods value ( ("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) ("2003-11-20-08:50" "2003-11-20-09:55" TRUE TRUE)) ]) transformstream consume
#testcase atperiods_ureal OUTSIDE
#yields ((rel (tuple ( (Elem ureal)))) () )
query (ur4 atperiods [const periods value ( ("2001-11-20-06:05" "2002-11-20-06:10" TRUE FALSE) ("2004-11-20-06:50" "2005-11-20-07:00" TRUE TRUE)) ]) transformstream consume
#testcase atperiods_ureal ureal-undef
#yields ((rel (tuple ( (Elem ureal)))) ( ) )
query (ur3 atperiods [const periods value ( ("2003-11-20-06:05" "2003-11-20-06:10" TRUE FALSE) ("2003-11-20-06:50" "2003-11-20-06:55" TRUE FALSE)) ]) transformstream consume
#testcase atperiods_ureal periods-empty
#yields ((rel (tuple ( (Elem ureal)))) ( ) )
query (ur4 atperiods [const periods value ( ) ]) transformstream consume
#testcase atperiods_ureal MANYCASES
#yields ((rel (tuple ( (Elem ureal)))) (((("2003-11-20-06:00" "2003-11-20-06:05" TRUE FALSE) (1.0 1.0 1.0 TRUE))) ((("2003-11-20-06:05" "2003-11-20-06:10" FALSE FALSE) (1.0 1.006944444444444444 1.003484278549383 TRUE))) ((("2003-11-20-06:50" "2003-11-20-07:00" FALSE FALSE) (1.0 1.06944444444444445 1.035927854938272 TRUE))) ) )
query (ur4 atperiods [const periods value ( ("2003-11-20-05:05" "2003-11-20-05:10" TRUE TRUE) ("2003-11-20-05:55" "2003-11-20-06:05" TRUE FALSE) ("2003-11-20-06:05" "2003-11-20-06:10" FALSE FALSE) ("2003-11-20-06:50" "2003-11-20-07:55" FALSE TRUE) ("2003-11-20-07:59" "2003-11-20-08:55" FALSE TRUE) ) ]) transformstream consume
#testcase initial_uconst defined
#yields (iint ("2003-11-20-06:00" 1500))
query initial(ui1)
#testcase initial_uconst undefined
#yields (iint undefined)
query initial(ui3)
#testcase initial_ureal defined
#tolerance_real 0.00001
#yields (ireal ("2000-01-01" -1.0))
query initial(ur1)
#testcase initial_ureal undefined
#yields (ireal undefined)
query initial(ur3)
#testcase final_uconst defined
#yields (iint ("2003-11-20-07:00" 1500))
query final(ui1)
#testcase final_uconst undefined
#yields (iint undefined)
query initial(ui3)
#testcase final_ureal defined
#tolerance_real 0.00001
#yields (ireal ("2000-01-05" 15.0))
query final(ur1)
#testcase final_ureal undefined
#yields (ireal undefined)
query final(ur3)
#testcase trajectory_up undefined
#yields (line undefined)
query trajectory(up3)
#testcase trajectory_up defined up1
#yields (line ( (1000.0 1000.0 2000.0 2000.0) ) )
query trajectory(up1)
#testcase trajectory_up defined up2
#yields (line ( (1000.0 1000.0 2000.0 2000.0) ) )
query trajectory(up2)
#testcase speed_upoint undef
#yields (ureal undefined)
query speed(up3)
#testcase speed_upoint def1
#yields (ureal (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE)(0.0 0.0 0.277777 FALSE)))
query speed(up4)
#testcase speed_upoint def2
#yields (ureal (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE)(0.0 0.0 0.0 FALSE)))
query speed(up6)
#testcase speed_upoint def3
#yields (ureal (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE)(0.0 0.0 0.392837 FALSE)))
query speed(up1)
#testcase distance_point_upoint ZERODISTANCE
#yields (ureal (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE)(0.0 0.0 0.0 FALSE)))
query distance(p, up6)
#testcase distance_upoint_point ZERODISTANCE
#yields (ureal (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE)(0.0 0.0 0.0 FALSE)))
query distance(up6, p)
#tolerance_real 3.0
#testcase distance_point_upoint NONZERODISTANCE 1
#yields (ureal (("2000-01-02-23:50" "2000-01-03-00:10" TRUE TRUE)(10368000000.0 -144000000.0 500000.0 TRUE)))
query distance(p, up7)
#testcase distance_point_upoint NONZERODISTANCE 2
#yields (ureal (("2003-01-01-12:00" "2003-01-01-12:20" TRUE TRUE)(10368000000.0 -144000000.0 500000.0 TRUE)))
query distance(p, up8)
#testcase distance_upoint_upoint undef undef
#yields (ureal undefined)
query distance(up3, up3)
#testcase distance_upoint_upoint def undef
#yields (ureal undefined)
query distance(up1, up3)
#testcase distance_upoint_upoint undef def
#yields (ureal undefined)
query distance(up3, up2)
#testcase distance_upoint_upoint def def
#yields (ureal (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (4608000000.0 -192000000.0 2000000.0 TRUE)))
query distance(up1, up2)
#testcase distance_upoint_upoint def def ZERO
#yields (ureal (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE)(0.0 0.0 0.0 FALSE)))
query distance(up1, up1)
#testcase distance_upoint_upoint def def ClipLeft
#yields (ureal (("2003-11-20-06:00" "2003-11-20-06:30" TRUE TRUE) (1152000000.0 -192000000.0 8000000.0 TRUE)))
query distance(up1,up9)
#tolerance_real 0.0001
#testcase distance_int_uint DEF DEF
#yields (ureal (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (0.0 0.0 1400.0 FALSE)))
query distance(i1, ui1)
#testcase distance_int_uint DEF UNDEF
#yields (ureal undefined)
query distance(i1, ui3)
#testcase distance_int_uint UNDEF DEF
#yields (ureal undefined)
query distance(i3, ui1)
#testcase distance_uint_int DEF DEF
#yields (ureal (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (0.0 0.0 1400.0 FALSE)))
query distance(ui1, i1)
#testcase distance_uint_int UNDEF DEF
#yields (ureal undefined)
query distance(ui3, i1)
#testcase distance_uint_int DEF UNDEF
#yields (ureal undefined)
query distance(ui1, i3)
#testcase distance_uint_uint ZERO
#yields (ureal (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (0.0 0.0 0.0 FALSE)))
query distance(ui1, ui1)
#testcase distance_uint_uint DEF UNDEF
#yields (ureal undefined)
query distance(ui1, ui3)
#testcase distance_uint_uint UNDEF DEF
#yields (ureal undefined)
query distance(ui3, ui1)
#testcase intersection_uconst_const def undef
#yields (int 0)
query intersection(ui1, i3) count
#testcase intersection_uconst_const undef def
#yields (int 0)
query intersection(ui3, i1) count
#testcase intersection_uconst_const EMPTY
#yields (int 0)
query intersection(ui1, i1) count
#testcase intersection_uconst_const NONEMPTY
#yields (int 1)
query intersection(ui1, [const int value 1500]) count
#testcase intersection_const_uconst undef def
#yields (int 0)
query intersection(i3, ui1) count
#testcase intersection_const_uconst def undef
#yields (int 0)
query intersection(i1, ui3) count
#testcase intersection_const_uconst EMPTY
#yields (int 0)
query intersection(i1, ui1) count
#testcase intersection_const_uconst NONEMPTY
#yields (int 1)
query intersection([const int value 1500], ui1) count
#testcase intersection_uconst_uconst def undef
#yields (int 0)
query intersection(ui1, ui3) count
#testcase intersection_uconst_uconst undef def
#yields (int 0)
query intersection(ui3, ui2) count
#testcase intersection_uconst_uconst EMPTY
#yields (int 0)
query intersection(ui1, ui2) count
#testcase intersection_uconst_uconst NONEMPTY
#yields ((rel (tuple ( (Elem uint)))) (((("2003-11-20-06:30" "2003-11-20-07:00" TRUE FALSE) 1000))))
query intersection(ui2, ui4) transformstream consume
#testcase intersection_ureal_real DEF UNDEF
#yields (int 0)
query intersection(ur1, [const real value undef]) count
#testcase intersection_ureal_real UNDEF DEF
#yields (int 0)
query intersection(ur3, r) count
#testcase intersection_ureal_real EMPTY
#yields (int 0)
query intersection(ur1, [const real value -500000.0]) count
#testcase intersection_ureal_real NONEMPTY
#yields ((rel (tuple ( (Elem ureal)))) (((("2000-01-02" "2000-01-02" TRUE TRUE) (0.0 0.0 0.0 FALSE)))))
query intersection(ur1, r) transformstream consume
#testcase intersection_real_ureal DEF UNDEF
#yields (int 0)
query intersection([const real value undef], ur1) count
#testcase intersection_real_ureal UNDEF DEF
#yields (int 0)
query intersection(r, ur3) count
#testcase intersection_real_ureal EMPTY
#yields (int 0)
query intersection([const real value -500000.0], ur1) count
#testcase intersection_real_ureal NONEMPTY
#yields ((rel (tuple ( (Elem ureal)))) (((("2000-01-02" "2000-01-02" TRUE TRUE) (0.0 0.0 0.0 FALSE)))))
query intersection(r, ur1) transformstream consume
#testcase intersection_ureal_ureal DEF UNDEF
#yields (int 0)
query intersection(ur1, ur3) count
#testcase intersection_ureal_ureal UNDEF DEF
#yields (int 0)
query intersection(ur3, ur2) count
#testcase intersection_ureal_ureal EMPTY
#yields (int 0)
query intersection(ur1, ur2) count
#testcase intersection_ureal_ureal SELF
#yields (mreal ( ( ("2000-01-01" "2000-01-05" TRUE TRUE) (1.0 0.0 -1.0 FALSE))))
query intersection(ur1, ur1) the_mvalue
#testcase intersection_ureal_ureal SINGLE1
#yields (mreal ( ( ("2000-01-02" "2000-01-02" TRUE TRUE) (0.0 0.0 0.0 FALSE))))
query intersection(ur5, ur6) the_mvalue
#testcase intersection_ureal_ureal SINGLE2
#yields (mreal ( ( ("2000-01-02" "2000-01-02" TRUE TRUE) (0.0 0.0 0.0 FALSE))))
query intersection(ur6, ur5) the_mvalue
#testcase intersection_ureal_ureal DOUBLE1
#yields (mreal ( ( ("2003-11-20-06:19:23.604" "2003-11-20-06:19:23.604" TRUE TRUE) (0.0 0.0 499.99991902221586 FALSE)) ( ("2003-11-20-06:40:36.396" "2003-11-20-06:40:36.396" TRUE TRUE) (0.0 0.0 499.99991902221643 FALSE))))
query intersection(distance(up1,up2),[const ureal value (("2003-11-20-05:00" "2003-11-20-08:00" TRUE TRUE)(0.0 0.0 500.0 FALSE))]) the_mvalue
#testcase intersection_ureal_ureal DOUBLE2
#yields (mreal ( ( ("2003-11-20-06:19:23.604" "2003-11-20-06:19:23.604" TRUE TRUE) (0.0 0.0 499.99991902221586 FALSE)) ( ("2003-11-20-06:40:36.396" "2003-11-20-06:40:36.396" TRUE TRUE) (0.0 0.0 499.99991902221643 FALSE))))
query intersection([const ureal value (("2003-11-20-05:00" "2003-11-20-08:00" TRUE TRUE)(0.0 0.0 500.0 FALSE))],distance(up1,up2)) the_mvalue
#testcase intersection_upoint_point UNDEF DEF
#yields (int 0)
query intersection(up3,p) count
#testcase intersection_upoint_point DEF UNDEF
#yields (int 0)
query intersection(up1,p3) count
#testcase intersection_upoint_point EMPTY
#yields (int 0)
query intersection(up4,p) count
#testcase intersection_upoint_point NONEMPTY
#yields ((rel (tuple ( (Elem upoint)))) (((("2003-11-20-06:30" "2003-11-20-06:30" TRUE TRUE)(1500.0 1500.0 1500.0 1500.0)))))
query intersection(up1,p) transformstream consume
#testcase intersection_point_upoint UNDEF DEF
#yields (int 0)
query intersection(p3,up2) count
#testcase intersection_point_upoint DEF UNDEF
#yields (int 0)
query intersection(p,up3) count
#testcase intersection_point_upoint EMPTY
#yields (int 0)
query intersection(p,up5) count
#testcase intersection_point_upoint NONEMPTY
#yields ((rel (tuple ( (Elem upoint)))) (((("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE)(1500.0 1500.0 1500.0 1500.0)))))
query intersection(p,up6) transformstream consume
#testcase intersection_upoint_upoint UNDEF DEF
#yields (int 0)
query intersection(up3,up4) count
#testcase intersection_upoint_upoint DEF UNDEF
#yields (int 0)
query intersection(up2,up3) count
#testcase intersection_upoint_upoint EMPTY
#yields (int 0)
query intersection(up2,up5) count
#testcase intersection_upoint_upoint NONEMPTY
#yields ((rel (tuple ( (Elem upoint)))) (((("2003-11-20-06:30" "2003-11-20-06:30" TRUE TRUE)(1500.0 1500.0 1500.0 1500.0)))))
query intersection(up1,up2) transformstream consume
#testcase intersection_upoint_line DEF EMPTY
#yields (int 0)
query intersection(up1, line3) count
#testcase intersection_upoint_line UNDEF NONEMPTY
#yields (int 0)
query intersection(up3, line2) count
#testcase intersection_upoint_line EMPTYRESULT
#yields (int 0)
query intersection(up9, line1) count
#testcase intersection_upoint_line SINGLE POINT
#yields ((rel (tuple ( (Elem upoint)))) (((("2003-11-20-06:30" "2003-11-20-06:30" TRUE TRUE) (1500.0 1500.0 1500.0 1500.0)))))
query intersection(up2, line1) transformstream consume
#testcase intersection_upoint_line SINGLE LINE
#yields ((rel (tuple ( (Elem upoint)))) (((("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (2000.0 2000.0 1000.0 1000.0)))))
query intersection(up1, line4) transformstream consume
#testcase intersection_upoint_line MIXED
#yields (mpoint ((("2003-11-20-06:00:36" "2003-11-20-06:06" TRUE TRUE) (1010.0 1010.0 1100.0 1100.0)) (("2003-11-20-06:36" "2003-11-20-06:36" TRUE TRUE) (1600.0 1600.0 1600.0 1600.0)) (("2003-11-20-06:38:26.139" "2003-11-20-06:38:26.139" TRUE TRUE) (1640.594166666667 1640.594166666667 1640.594166666667 1640.594166666667)) (("2003-11-20-06:48" "2003-11-20-07:00" TRUE FALSE) (1800.0 1800.0 2000.0 2000.0))))
query intersection(up2, line2) transformstream makemvalue[Elem]
#testcase intersection_upoint_line collinearCoherentSegments
#yields ((rel (tuple ( (Elem upoint)))) (((("2003-11-20-06:00" "2003-11-20-06:48" TRUE TRUE) (1000.0 1000.0 1800.0 1800.0)))))
query intersection(up2, line5) transformstream consume
#testcase intersection_upoint_line overlappingSegments
#yields ((rel (tuple ( (Elem upoint)))) (((("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (1000.0 1000.0 2000.0 2000.0)))))
query intersection(up2, line6) transformstream consume
#testcase intersection_line_upoint EMPTY DEF
#yields (int 0)
query intersection(line3, up1) count
#testcase intersection_line_upoint NONEMPTY UNDEF
#yields (int 0)
query intersection(line2, up3) count
#testcase intersection_line_upoint EMPTYRESULT
#yields (int 0)
query intersection(line1, up9) count
#testcase intersection_line_upoint SINGLE POINT
#yields ((rel (tuple ( (Elem upoint)))) (((("2003-11-20-06:30" "2003-11-20-06:30" TRUE TRUE) (1500.0 1500.0 1500.0 1500.0)))))
query intersection(line1, up2) transformstream consume
#testcase intersection_line_upoint SINGLE LINE
#yields ((rel (tuple ( (Elem upoint)))) (((("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (2000.0 2000.0 1000.0 1000.0)))))
query intersection(line4, up1) transformstream consume
#testcase intersection_line_upoint MIXED
#yields (mpoint ((("2003-11-20-06:00:36" "2003-11-20-06:06" TRUE TRUE) (1010.0 1010.0 1100.0 1100.0)) (("2003-11-20-06:36" "2003-11-20-06:36" TRUE TRUE) (1600.0 1600.0 1600.0 1600.0)) (("2003-11-20-06:38:26.139" "2003-11-20-06:38:26.139" TRUE TRUE) (1640.594166666667 1640.594166666667 1640.594166666667 1640.594166666667)) (("2003-11-20-06:48" "2003-11-20-07:00" TRUE FALSE) (1800.0 1800.0 2000.0 2000.0))))
query intersection(line2, up2) transformstream makemvalue[Elem]
#testcase intersection_line_upoint collinearCoherentSegments
#yields ((rel (tuple ( (Elem upoint)))) (((("2003-11-20-06:00" "2003-11-20-06:48" TRUE TRUE) (1000.0 1000.0 1800.0 1800.0)))))
query intersection(line5, up2) transformstream consume
#testcase intersection_line_upoint overlappingSegments
#yields ((rel (tuple ( (Elem upoint)))) (((("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (1000.0 1000.0 2000.0 2000.0)))))
query intersection(line6, up2) transformstream consume
#testcase intersection_upoint_region
#yields (mpoint ((("2003-11-20-06:18" "2003-11-20-06:24" TRUE TRUE)(1700.0 1700.0 1600.0 1600.0))(("2003-11-20-06:30" "2003-11-20-06:30" TRUE TRUE)(1500.0 1500.0 1500.0 1500.0))(("2003-11-20-06:36" "2003-11-20-06:48" TRUE TRUE)(1400.0 1400.0 1200.0 1200.0))(("2003-11-20-06:54" "2003-11-20-06:55:30" TRUE TRUE)(1100.0 1100.0 1075.0 1075.0))(("2003-11-20-06:56:06" "2003-11-20-06:57:54" TRUE TRUE)(1065.0 1065.0 1035.0 1035.0))(("2003-11-20-06:58:30" "2003-11-20-07:00" TRUE FALSE)(1025.0 1025.0 1000.0 1000.0))))
query intersection(up1, spiral) the_mvalue
#testcase intersection_region_upoint
#yields (mpoint ((("2003-11-20-06:00" "2003-11-20-06:01:30" TRUE TRUE)(1000.0 1000.0 1025.0 1025.0))(("2003-11-20-06:02:06" "2003-11-20-06:03:54" TRUE TRUE)(1035.0 1035.0 1065.0 1065.0))(("2003-11-20-06:04:30" "2003-11-20-06:06" TRUE TRUE)(1075.0 1075.0 1100.0 1100.0))(("2003-11-20-06:12" "2003-11-20-06:24" TRUE TRUE)(1200.0 1200.0 1400.0 1400.0))(("2003-11-20-06:30" "2003-11-20-06:30" TRUE TRUE)(1500.0 1500.0 1500.0 1500.0))(("2003-11-20-06:36" "2003-11-20-06:42" TRUE TRUE)(1600.0 1600.0 1700.0 1700.0))))
query intersection(spiral, up2) the_mvalue
#testcase intersection_upoint_uregion
#yields (mpoint ( ( ("2003-11-20-06:00" "2003-11-20-06:00" TRUE TRUE) (1500.0 1500.0 1500.0 1500.0)) ( ("2003-11-20-06:06" "2003-11-20-06:12" TRUE TRUE) (1500.0 1500.0 1500.0 1500.0))))
query intersection(up6, uspiral) the_mvalue
#testcase intersection_uregion_upoint_empty
#yields (mpoint () )
query intersection(uspiral, up4) the_mvalue
#testcase the_mvalue mpoint
#yields @$(SECONDO_BUILD_DIR)/Tests/Testspecs/tempunitalg/zug5AsResult
query units(zug5) the_mvalue
#testcase the_mvalue mreal
#tolerance_real 0.001
#yields @$(SECONDO_BUILD_DIR)/Tests/Testspecs/tempunitalg/zug5_speed
query units(speed(zug5)) the_mvalue
#testcase the_mvalue mint
#yields (mint ((("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE)1500)))
query ui1 feed the_mvalue
#testcase the_mvalue mbool
#yields (mbool ((("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE)TRUE)))
query ubool1 feed the_mvalue
#testcase the_mvalue mstring
#yields (mstring ((("2003-11-20-06:00" "2003-11-20-07:00" FALSE FALSE)"VENI VIDI VICI")))
query the_unit("VENI VIDI VICI", inst1, inst2, FALSE, FALSE) feed the_mvalue
#testcase the_unit (point point instant instant bool bool) --> upoint (1)
#yields (upoint (("2003-11-20-06:00" "2003-11-20-07:00" FALSE FALSE)(2000.0 2000.0 1000.0 1000.0)))
query the_unit(p1, p2, inst1, inst2, FALSE, FALSE)
#testcase the_unit (point point instant instant bool bool) --> upoint (2)
#yields (upoint (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE)(1000.0 1000.0 2000.0 2000.0)))
query the_unit(p1, p2, inst2, inst1, TRUE, FALSE)
#testcase the_unit (ipoint ipoint bool bool) --> upoint (1)
#yields (upoint (("2003-11-20-06:00" "2003-11-20-07:00" TRUE TRUE)(2000.0 2000.0 1000.0 1000.0)))
query the_unit (the_ivalue(inst1, p1), the_ivalue(inst2, p2), TRUE, TRUE)
#testcase the_unit (ipoint ipoint bool bool) --> upoint (2)
#yields (upoint (("2003-11-20-06:00" "2003-11-20-07:00" FALSE TRUE)(2000.0 2000.0 1000.0 1000.0)))
query the_unit (the_ivalue(inst2, p2), the_ivalue(inst1, p1), FALSE, TRUE)
#testcase the_unit (real real real bool instant instant bool bool) --> ureal (1)
#yields (ureal (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE)(2.0 -3.0 2.5 TRUE)))
query the_unit(r1, r2, r + 2.5, TRUE, inst1, inst2, TRUE, FALSE)
#testcase the_unit (real real real bool instant instant bool bool) --> ureal (1)
#yields (ureal (("2003-11-20-06:00" "2003-11-20-07:00" FALSE TRUE)(-3.0 2.5 2.0 TRUE)))
#testcase the_unit (iT duration bool bool) --> uT (1)
#yields (uint (("2003-11-20-06:00" "2003-11-21-18:00" FALSE FALSE)1500))
query the_unit(initial(ui1), create_duration(1.5), FALSE, FALSE)
#testcase the_unit (iT duration bool bool) --> uT (2)
#yields (uint (("2003-11-20-06:00" "2003-11-21-18:00" FALSE FALSE)1500))
query the_unit(initial(ui1), create_duration(1.5), FALSE, FALSE)
#testcase the_unit (iT duration bool bool) --> uT (3)
#yields (ubool undefined)
query the_unit(initial(ubool1), create_duration(0, 0), FALSE, FALSE)
#testcase the_unit (iT duration bool bool) --> uT (4)
#yields (ubool undefined)
query the_unit(initial(ubool1), create_duration(0, 1), FALSE, FALSE)
#testcase the_unit (T instant instant bool bool) --> uT (1)
#yields (ustring (("2003-11-20-06:00" "2003-11-20-07:00" FALSE TRUE)"Gliep!"))
query the_unit("Gliep!", inst1, inst2, FALSE, TRUE)
#testcase the_unit (T instant instant bool bool) --> uT (2)
#yields (uint undefined)
query the_unit(333, inst2, inst2, FALSE, TRUE)
#testcase the_unit (T instant instant bool bool) --> uT (3)
#yields (uint (("2003-11-20-07:00" "2003-11-20-07:00" TRUE TRUE)987654321))
query the_unit(987654321, inst2, inst2, TRUE, TRUE)
#testcase the_unit (T instant instant bool bool) --> uT (4)
#yields (ubool ( ("2003-11-20-06:00" "2003-11-20-06:00:00.001" FALSE FALSE) FALSE))
query the_unit(FALSE, inst1, inst1 + [const duration value (0 1)], FALSE, FALSE)
#testcase the_unit (T instant instant bool bool) --> uT (4)
#yields (ubool (("2003-11-20-06:00" "2003-11-20-06:00:00.001" FALSE TRUE)FALSE))
query the_unit(FALSE, inst1, inst1 + [const duration value (0 1)], FALSE, TRUE)
#testcase the_ivalue undef
#yields (iint undefined)
query the_ivalue(inst3, 75)
#testcase the_ivalue string
#yields (istring ("2003-11-20-06:00" "Hallo!"))
query the_ivalue(inst1, "Hallo!")
#testcase the_ivalue point
#yields (ipoint ("2003-11-20-07:00"(2000.0 2000.0)))
query the_ivalue(inst2, p1)
#testcase the_ivalue undef point
#yields (ipoint ("2003-11-20-07:00" undefined))
query the_ivalue(inst2, p3)
#testcase the_ivalue real
#yields (ireal ("2003-11-20-07:00" 2.0))
query the_ivalue(inst2, r1)
#testcase the_ivalue bool
#yields (ibool ("2003-11-20-07:00" FALSE))
query the_ivalue(inst2, FALSE)
##testcase the_ivalue region
##yields (iregion undefined)
#query the_ivalue(inst3, spiral)
#testcase no_components undef
#yields (uint undefined)
query no_components(up3)
#testcase no_components def
#yields (uint (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) 1))
query no_components(up1)
#testcase no_components uregion
#yields (uint (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) 1))
query no_components(ureg)
#testcase isempty undef
#yields (bool TRUE)
query isempty([const uint value undef])
#testcase isempty def
#yields (bool FALSE)
query isempty([const uint value (("2003-11-12" "2005-05-30" FALSE FALSE) 7)])
#testcase not undef
#yields (ubool undefined)
query not([const ubool value undef])
#testcase not TRUE
#yields (ubool (("2003-11-12" "2005-05-30" FALSE FALSE) FALSE))
query not([const ubool value (("2003-11-12" "2005-05-30" FALSE FALSE) TRUE)])
#testcase not FALSE
#yields (ubool (("2003-11-12" "2005-05-30" FALSE FALSE) TRUE))
query not([const ubool value (("2003-11-12" "2005-05-30" FALSE FALSE) FALSE)])
#testcase and_ubool_ubool undef arg1
#yields (ubool undefined)
query ubool3 and ubool1
#testcase and_ubool_ubool undef arg2
#yields (ubool undefined)
query ubool1 and ubool3
#testcase and_ubool_ubool no intersect
#yields (ubool undefined)
query ubool2 and ubool4
#testcase and_ubool_ubool TRUE
#yields (ubool (("2003-11-20-06:00" "2003-11-20-06:00" TRUE TRUE) TRUE))
query ubool1 and ubool2
#testcase and_ubool_ubool FALSE
#yields (ubool (("2003-11-20-06:30" "2003-11-20-06:45" TRUE FALSE) FALSE))
query ubool1 and ubool4
#testcase and_bool_ubool undef arg1
#yields (ubool undefined)
query [const bool value undef] and ubool1
#testcase and_bool_ubool undef arg2
#yields (ubool undefined)
query [const bool value TRUE] and ubool3
#testcase and_bool_ubool TRUE
#yields (ubool (("2003-11-20-05:00" "2003-11-20-06:00" TRUE TRUE) TRUE))
query [const bool value TRUE] and ubool2
#testcase and_bool_ubool FALSE 1
#yields (ubool (("2003-11-20-05:00" "2003-11-20-06:00" TRUE TRUE) FALSE))
query [const bool value FALSE] and ubool2
#testcase and_bool_ubool FALSE 2
#yields (ubool (("2003-11-20-06:30" "2003-11-20-06:45" TRUE FALSE) FALSE))
query [const bool value TRUE] and ubool4
#testcase and_ubool_bool undef arg2
#yields (ubool undefined)
query ubool1 and [const bool value undef]
#testcase and_ubool_bool undef arg1
#yields (ubool undefined)
query ubool3 and [const bool value TRUE]
#testcase and_bool_ubool TRUE
#yields (ubool (("2003-11-20-05:00" "2003-11-20-06:00" TRUE TRUE) TRUE))
query ubool2 and [const bool value TRUE]
#testcase and_bool_ubool FALSE 2
#yields (ubool (("2003-11-20-05:00" "2003-11-20-06:00" TRUE TRUE) FALSE))
query ubool2 and [const bool value FALSE]
#testcase and_bool_ubool FALSE 1
#yields (ubool (("2003-11-20-06:30" "2003-11-20-06:45" TRUE FALSE) FALSE))
query ubool4 and [const bool value TRUE]
#testcase or_ubool_ubool undef arg1
#yields (ubool undefined)
query ubool3 or ubool1
#testcase or_ubool_ubool undef arg2
#yields (ubool undefined)
query ubool1 or ubool3
#testcase or_ubool_ubool no intersect
#yields (ubool undefined)
query ubool2 or ubool4
#testcase or_ubool_ubool TRUE 1
#yields (ubool (("2003-11-20-06:00" "2003-11-20-06:00" TRUE TRUE) TRUE))
query ubool1 or ubool2
#testcase or_ubool_ubool TRUE 2
#yields (ubool (("2003-11-20-06:30" "2003-11-20-06:45" TRUE FALSE) TRUE))
query ubool1 or ubool4
#testcase or_ubool_ubool FALSE
#yields (ubool (("2003-11-20-06:30" "2003-11-20-06:45" TRUE FALSE) FALSE))
query ubool4 or ubool4
#testcase or_bool_ubool undef arg1
#yields (ubool undefined)
query [const bool value undef] or ubool1
#testcase or_bool_ubool undef arg2
#yields (ubool undefined)
query [const bool value TRUE] or ubool3
#testcase or_bool_ubool TRUE 1
#yields (ubool (("2003-11-20-05:00" "2003-11-20-06:00" TRUE TRUE) TRUE))
query [const bool value TRUE] or ubool2
#testcase or_bool_ubool TRUE 2
#yields (ubool (("2003-11-20-05:00" "2003-11-20-06:00" TRUE TRUE) TRUE))
query [const bool value FALSE] or ubool2
#testcase or_bool_ubool TRUE 3
#yields (ubool (("2003-11-20-06:30" "2003-11-20-06:45" TRUE FALSE) TRUE))
query [const bool value TRUE] or ubool4
#testcase or_bool_ubool FALSE
#yields (ubool (("2003-11-20-06:30" "2003-11-20-06:45" TRUE FALSE) FALSE))
query [const bool value FALSE] or ubool4
#testcase inside upoint uregion
#yields (mbool ( ( ("2003-11-20-06:00" "2003-11-20-06:21:28.272" TRUE FALSE) FALSE) (("2003-11-20-06:21:28.272" "2003-11-20-06:28:31.203" TRUE TRUE) TRUE) ( ("2003-11-20-06:28:31.203" "2003-11-20-07:00" FALSE FALSE) FALSE)))
query (up1 inside ureg) the_mvalue
#testcase inside upoint uregion
#yields (mbool ( ( ("2003-11-20-06:00" "2003-11-20-06:32:13.196" TRUE FALSE) FALSE) ( ("2003-11-20-06:32:13.196" "2003-11-20-06:42:47.591" TRUE TRUE) TRUE) ( ("2003-11-20-06:42:47.591" "2003-11-20-07:00" FALSE FALSE) FALSE)))
query (up2 inside ureg) the_mvalue
#testcase inside upoint uregion
#yields (mbool ( ( ("2003-11-20-05:30" "2003-11-20-06:30" TRUE TRUE) FALSE)))
query (up9 inside ureg) the_mvalue
#testcase sometimes Unit TRUE
#yields (bool TRUE)
query sometimes(ubool2)
#testcase sometimes Unit FALSE
#yields (bool FALSE)
query sometimes(ubool4)
#testcase sometimes Unit UNDEF
#yields (bool FALSE)
query sometimes(ubool3)
#testcase sometimesStream TRUE
#yields (bool TRUE)
query sometimes( up1 inside ureg )
#testcase sometimesStream FALSE
#yields (bool FALSE)
query sometimes( up9 inside ureg )
#testcase never Unit TRUE
#yields (bool TRUE)
query never(ubool4)
#testcase never Unit FALSE
#yields (bool FALSE)
query never(ubool2)
#testcase never Unit UNDEF
#yields (bool TRUE)
query never(ubool3)
#testcase never Stream TRUE
#yields (bool TRUE)
query never( up9 inside ureg )
#testcase never Stream FALSE
#yields (bool FALSE)
query never( up1 inside ureg )
#testcase always Unit TRUE
#yields (bool TRUE)
query always(ubool2)
#testcase always Unit FALSE
#yields (bool FALSE)
query always(ubool4)
#testcase always Unit UNDEF
#yields (bool FALSE)
query always(ubool3)
#testcase alwaysStream Unit TRUE
#yields (bool TRUE)
query always( (up9 inside ureg) use[fun(X:ubool) not(X)] )
#testcase alwaysStream Unit FALSE
#yields (bool FALSE)
query always(up1 inside ureg)
#testcase isEqualVal constUnit
#yields (bool TRUE)
query always(ui2 = ui4)
#testcase isEqualVal upoint
#yields (mbool ((("2003-11-20-06:00" "2003-11-20-06:30" TRUE FALSE)FALSE)(("2003-11-20-06:30" "2003-11-20-06:30" TRUE TRUE)TRUE)(("2003-11-20-06:30" "2003-11-20-07:00" FALSE FALSE)FALSE)))
query (up1 = up2 ) the_mvalue
#testcase isEqualVal ureal
#yields (mbool ((("2000-01-02-23:59:59.900" "2000-01-03-00:00:00.100" TRUE TRUE) FALSE)))
query (ur1 = ur2) the_mvalue
#testcase isNotEqualVal upoint
#yields (mbool ( ( ("2003-11-20-06:00" "2003-11-20-06:30" TRUE FALSE) TRUE) ( ("2003-11-20-06:30" "2003-11-20-06:30" TRUE TRUE) FALSE) ( ("2003-11-20-06:30" "2003-11-20-07:00" FALSE FALSE) TRUE)) )
query (up1 # up2 ) the_mvalue
#testcase isNotEqualVal constUnit
#yields (mbool ( ( ("2003-11-20-06:30" "2003-11-20-07:00" TRUE FALSE) FALSE)))
query (ui2 # ui4) the_mvalue
#testcase isNotEqualVal ureal
#yields (mbool ( ( ("2000-01-01" "2000-01-02" TRUE FALSE) TRUE) ( ("2000-01-02" "2000-01-02" TRUE TRUE) FALSE) ( ("2000-01-02" "2000-01-05" FALSE TRUE) TRUE)))
query (ur5 # ur6) the_mvalue
#testcase isSmallerVal constUnit
#yields (bool TRUE)
query never (ui2 < ui4)
#testcase isSmallerVal ureal
#yields (mbool ( ( ("2000-01-01" "2000-01-02" TRUE FALSE) TRUE) ( ("2000-01-02" "2000-01-05" TRUE TRUE) FALSE)))
query (ur5 < ur6) the_mvalue
#testcase isSmallerEqVal constUnit
#yields (mbool ( ( ("2003-11-20-06:30" "2003-11-20-07:00" TRUE FALSE) TRUE)))
query (ui2 <= ui4) the_mvalue
#testcase isSmallerEqVal ureal
#yields (mbool ( ( ("2000-01-01" "2000-01-02" TRUE TRUE) TRUE) ( ("2000-01-02" "2000-01-05" FALSE TRUE) FALSE)))
query (ur5 <= ur6) the_mvalue
#testcase isBiggerVal constUnit
#yields (bool TRUE)
query never (ui2 > ui4)
#testcase isBiggerVal ureal
#yields (mbool ( ( ("2000-01-01" "2000-01-02" TRUE TRUE) FALSE) ( ("2000-01-02" "2000-01-05" FALSE TRUE) TRUE)))
query (ur5 > ur6) the_mvalue
#testcase isBiggerEqVal constUnit
#yields (mbool ( ( ("2003-11-20-06:30" "2003-11-20-07:00" TRUE FALSE) TRUE)))
query (ui2 >= ui4) the_mvalue
#testcase isBiggerEqVal ureal
#yields (mbool ( ( ("2000-01-01" "2000-01-02" TRUE FALSE) FALSE) ( ("2000-01-02" "2000-01-05" TRUE TRUE) TRUE)))
query (ur5 >= ur6) the_mvalue
#testcase abs_uint pos
#yields (uint (("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) 1500))
query abs(ui1)
#testcase abs_uint neg
#yields (uint (("2000-01-01" "2000-01-02" FALSE FALSE) 378351))
query abs([const uint value (("2000-01-01" "2000-01-02" FALSE FALSE) -378351)])
#testcase abs_uint undef
#yields (uint undefined)
query abs(ui3)
#testcase abs_ureal pos 1
#yields (mreal ( ( ("2003-11-20-06:00" "2003-11-20-07:00" TRUE FALSE) (1.0 1.0 1.0 TRUE))))
query abs(ur4) the_mvalue
#testcase abs_ureal pos 2
#yields (mreal ((("2000-01-01" "2000-01-02" TRUE FALSE)(1.0 -4.0 3.0 FALSE))(("2000-01-02" "2000-01-04" TRUE FALSE)(-1.0 2.0 -0.0 FALSE))(("2000-01-04" "2000-01-05" TRUE TRUE)(1.0 2.0 0.0 FALSE))))
query abs([const ureal value (("2000-01-01" "2000-01-05" TRUE TRUE) (1.0 -4.0 3.0 FALSE))]) the_mvalue
#restcase abs_ureal pos radix
#yields (mreal ((("2000-01-01" "2000-01-05" FALSE FALSE)(1.0 4.0 3.0 TRUE))))
query abs([const ureal value (("2000-01-01" "2000-01-05" FALSE FALSE) (1.0 4.0 3.0 TRUE))]) the_mvalue
#testcase abs_ureal neg 1
#yields (mreal ( ( ("2000-01-02-23:59:59.900" "2000-01-03-00:00:00.100" TRUE TRUE) (1.0 1.0 1.0 FALSE))))
query abs(ur2) the_mvalue
#testcase abs_ureal neg 2
#yields (mreal ( ( ("2000-01-01" "2000-01-02" TRUE FALSE) (-1.0 1.0 0.0 FALSE)) ( ("2000-01-02" "2000-01-04" TRUE TRUE) (1.0 1.0 -0.0 FALSE))))
query abs([const ureal value (("2000-01-01" "2000-01-04" TRUE TRUE) (-1.0 1.0 0.0 FALSE))]) the_mvalue
#testcase abs_ureal undef
#yields (mreal ())
query abs(ur3) the_mvalue
############################
# Complex testcases #
############################
##testcase COMPLEX1 aggregateB
##yields @$(SECONDO_BUILD_DIR)/Tests/Testspecs/tempunitalg/zug5Trajectory
#query units(zug5) use[fun(ZZ:STREAMELEM) trajectory(ZZ)] transformstream aggregateB[Elem; fun(XX:line, YY:line) union_new(XX, YY); [const line value ()]];
##testcase COMPLEX2 aggregate
##yields @$(SECONDO_BUILD_DIR)/Tests/Testspecs/tempunitalg/zug5Trajectory
#query units(zug5) use[fun(ZZ:STREAMELEM) trajectory(ZZ)] transformstream aggregate[Elem; fun(XX:line, YY:line) union_new(XX, YY); [const line value ()]];
##testcase COMPLEX3 aggregateS
##yields @$(SECONDO_BUILD_DIR)/Tests/Testspecs/tempunitalg/zug5Trajectory
#query units(zug5) use[fun(ZZ:STREAMELEM) trajectory(ZZ)] aggregateS[fun(XX:line, YY:line) union_new(XX, YY); [const line value ()]];
############################
# mopping up test database #
############################
#teardown
close database;
delete database tempunittest