blob: 87ced14cdc784ac4bba47a2aa9f7029831a4ac07 [file] [log] [blame]
/* ----------------------------------------------------------------------- *//**
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*//* ----------------------------------------------------------------------- */
/* -----------------------------------------------------------------------------
* Test sparse Linear Systems
* -------------------------------------------------------------------------- */
DROP TABLE IF EXISTS "Sparse_linear_systems_lhs";
CREATE TABLE "Sparse_linear_systems_lhs" (
"Rid" INTEGER NOT NULL,
cid INTEGER,
val DOUBLE PRECISION
);
DROP TABLE IF EXISTS "Sparse_linear_systems_rhs";
CREATE TABLE "Sparse_linear_systems_rhs" (
"Rid" INTEGER NOT NULL,
val DOUBLE PRECISION
);
INSERT INTO "Sparse_linear_systems_lhs"("Rid", cid, val) VALUES
(0, 0, 1),
(1, 1, 1),
(2, 2, 1),
(3, 3, 1);
INSERT INTO "Sparse_linear_systems_rhs"("Rid", val) VALUES
(0, 1),
(1, 1),
(2, 1);
drop table if exists result_table;
select linear_solver_sparse(
'"Sparse_linear_systems_lhs"',
'"Sparse_linear_systems_rhs"',
'result_table',
'"Rid"',
'cid',
'val',
'"Rid"',
'val',
4,
NULL,
'direct',
'algorithm=ldlt');