{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "57a2b335-a7f3-4ace-a2d8-52219c4febc5", "metadata": {}, "outputs": [], "source": [ "include(\"thinQR.jl\")\n", "using .thinQR" ] }, { "cell_type": "code", "execution_count": 2, "id": "426735f0-859a-4f7d-83cf-f52f464a2737", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "3-element Vector{Float64}:\n", " 2.8498844747360086\n", " -2.404529848146403\n", " -0.3104749426792832" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "A = [1. 2; 3 4; 5 6]\n", "A = qrhous!(A)\n", "A * [1., 2, 3]" ] }, { "cell_type": "code", "execution_count": 3, "id": "afd34800-7b9a-4006-9849-071fa197d962", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "3-element Vector{Float64}:\n", " 2.8498844747360064\n", " -2.404529848146404\n", " -0.31047494267928366" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "using LinearAlgebra: qr!\n", "A = [1. 2.; 3. 4.; 5. 6.]\n", "(Q, R) = qr!(A)\n", "Q * [1., 2, 3]" ] } ], "metadata": { "kernelspec": { "display_name": "Julia 1.9.3", "language": "julia", "name": "julia-1.9" }, "language_info": { "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", "version": "1.9.3" } }, "nbformat": 4, "nbformat_minor": 5 }