All Downloads are FREE. Search and download functionalities are using the official Maven repository.

query.system.rq Maven / Gradle / Ivy

Go to download

Corese is a Semantic Web Factory (triple store and SPARQL endpoint) implementing RDF, RDFS, SPARQL 1.1 Query and Update.

There is a newer version: 4.6.1
Show newest version
select 
where {}
export {

function xt:div(?a, ?b) {  xsd:integer(floor(?a / ?b)) }

function xt:mod(?a, ?b) {  xsd:integer(?a - (?b * xt:div(?a, ?b))) }

function kg:compare(?x, ?y) { 
  if (?x < ?y, -1, 
  if (?x > ?y, 1, 0)) }

function xt:prime(?x) { 
    if (?x = 1, false,
    if (?x = 2, true, 
    ! mapany (xt:divisible, ?x, xt:cons(2, xt:iota(3, power(?x, 0.5), 2)))))
 }
                             
function xt:divisible(?x, ?n) { 
   (xt:mod(?x, ?n) = 0)
}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy