From f8b9cddfa63c2ce8567765d3f71e994551de0781 Mon Sep 17 00:00:00 2001 From: Daniel Weschke Date: Wed, 30 Oct 2019 16:02:18 +0100 Subject: [PATCH] add mathematics module with lcm function --- docs/build/html/_modules/index.html | 1 + docs/build/html/_modules/mathematics.html | 116 +++++++++++++++++++ docs/build/html/_sources/mathematics.rst.txt | 7 ++ docs/build/html/_sources/modules.rst.txt | 1 + docs/build/html/genindex.html | 6 +- docs/build/html/mathematics.html | 114 ++++++++++++++++++ docs/build/html/modules.html | 1 + docs/build/html/objects.inv | Bin 828 -> 859 bytes docs/build/html/py-modindex.html | 9 ++ docs/build/html/searchindex.js | 2 +- docs/source/mathematics.rst | 7 ++ docs/source/modules.rst | 1 + pylib/mathematics.py | 17 +++ 13 files changed, 280 insertions(+), 2 deletions(-) create mode 100644 docs/build/html/_modules/mathematics.html create mode 100644 docs/build/html/_sources/mathematics.rst.txt create mode 100644 docs/build/html/mathematics.html create mode 100644 docs/source/mathematics.rst create mode 100644 pylib/mathematics.py diff --git a/docs/build/html/_modules/index.html b/docs/build/html/_modules/index.html index a67f9f9..b525fb1 100644 --- a/docs/build/html/_modules/index.html +++ b/docs/build/html/_modules/index.html @@ -38,6 +38,7 @@
  • function
  • geometry
  • geometry_plot
  • +
  • mathematics
  • numerical.fit
  • numerical.integration
  • numerical.ode
  • diff --git a/docs/build/html/_modules/mathematics.html b/docs/build/html/_modules/mathematics.html new file mode 100644 index 0000000..2a2d031 --- /dev/null +++ b/docs/build/html/_modules/mathematics.html @@ -0,0 +1,116 @@ + + + + + + + mathematics — pylib 2019.5.19 documentation + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + +
    + +

    Source code for mathematics

    +#!/usr/bin/env python
    +# -*- coding: utf-8 -*-
    +"""Mathematical functions.
    +
    +:Date: 2019-10-30
    +
    +.. module:: mathematics
    +  :platform: *nix, Windows
    +  :synopsis: Mathematical functions.
    +
    +.. moduleauthor:: Daniel Weschke <daniel.weschke@directbox.de>
    +"""
    +from math import gcd
    +
    +
    [docs]def lcm(a, b): + """Compute the lowest common multiple of a and b""" + return a/gcd(a, b)*b
    +
    + +
    + +
    +
    + +
    +
    + + + + + + + \ No newline at end of file diff --git a/docs/build/html/_sources/mathematics.rst.txt b/docs/build/html/_sources/mathematics.rst.txt new file mode 100644 index 0000000..8447d59 --- /dev/null +++ b/docs/build/html/_sources/mathematics.rst.txt @@ -0,0 +1,7 @@ +mathematics module +================== + +.. automodule:: mathematics + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/build/html/_sources/modules.rst.txt b/docs/build/html/_sources/modules.rst.txt index 31ce243..192f6ab 100644 --- a/docs/build/html/_sources/modules.rst.txt +++ b/docs/build/html/_sources/modules.rst.txt @@ -9,5 +9,6 @@ pylib function geometry geometry_plot + mathematics numerical time_of_day diff --git a/docs/build/html/genindex.html b/docs/build/html/genindex.html index 7a8d0aa..01070aa 100644 --- a/docs/build/html/genindex.html +++ b/docs/build/html/genindex.html @@ -196,6 +196,8 @@

    L

    @@ -210,10 +212,12 @@

    M

    diff --git a/docs/build/html/mathematics.html b/docs/build/html/mathematics.html new file mode 100644 index 0000000..3aad2f0 --- /dev/null +++ b/docs/build/html/mathematics.html @@ -0,0 +1,114 @@ + + + + + + + mathematics module — pylib 2019.5.19 documentation + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + +
    + +
    +

    mathematics module

    +

    Mathematical functions.

    +
    +
    Date
    +

    2019-10-30

    +
    +
    +
    +
    +lcm(a, b)[source]
    +

    Compute the lowest common multiple of a and b

    +
    + +
    + + +
    + +
    +
    + +
    +
    + + + + + + + \ No newline at end of file diff --git a/docs/build/html/modules.html b/docs/build/html/modules.html index 658d651..e8be11c 100644 --- a/docs/build/html/modules.html +++ b/docs/build/html/modules.html @@ -41,6 +41,7 @@
  • function module
  • geometry module
  • geometry_plot module
  • +
  • mathematics module
  • numerical package
  • + + + + + diff --git a/docs/build/html/searchindex.js b/docs/build/html/searchindex.js index ddce9e0..bbe10ec 100644 --- a/docs/build/html/searchindex.js +++ b/docs/build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["data","date","function","geometry","geometry_plot","index","modules","numerical","time_of_day"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,"sphinx.ext.viewcode":1,sphinx:56},filenames:["data.rst","date.rst","function.rst","geometry.rst","geometry_plot.rst","index.rst","modules.rst","numerical.rst","time_of_day.rst"],objects:{"":{"function":[2,0,0,"-"],data:[0,0,0,"-"],date:[1,0,0,"-"],fit:[7,0,0,"-"],geometry:[3,0,0,"-"],geometry_plot:[4,0,0,"-"],integration:[7,0,0,"-"],numerical:[7,0,0,"-"],ode:[7,0,0,"-"],ode_model:[7,0,0,"-"],time_of_day:[8,0,0,"-"]},"function":{cosine_wave:[2,1,1,""],sine_wave:[2,1,1,""]},"numerical.fit":{gauss:[7,1,1,""],gauss_fit:[7,1,1,""]},"numerical.integration":{trapez:[7,1,1,""]},"numerical.ode":{e1:[7,1,1,""],e2:[7,1,1,""],e4:[7,1,1,""],fpi:[7,1,1,""],i1:[7,1,1,""],newmark_newtonraphson:[7,1,1,""],newmark_newtonraphson_rdk:[7,1,1,""]},"numerical.ode_model":{disk:[7,1,1,""],disk_nm:[7,1,1,""],disk_nmmdk:[7,1,1,""]},data:{fold_list:[0,1,1,""],get_id:[0,1,1,""],load:[0,1,1,""],read:[0,1,1,""],seq:[0,1,1,""],store:[0,1,1,""],unique_ending:[0,1,1,""],write:[0,1,1,""]},date:{"gau\u00dfsche_osterformel":[1,1,1,""],ascension_of_jesus:[1,1,1,""],easter_friday:[1,1,1,""],easter_monday:[1,1,1,""],easter_sunday:[1,1,1,""],pentecost:[1,1,1,""]},geometry:{angle:[3,1,1,""],cubic:[3,1,1,""],cubic_deg:[3,1,1,""],cubics:[3,1,1,""],distance:[3,1,1,""],interpolate_hermite:[3,1,1,""],line:[3,1,1,""],lines:[3,1,1,""],rectangle:[3,1,1,""],rotate:[3,1,1,""],rotate_deg:[3,1,1,""],rotate_xy:[3,1,1,""],square:[3,1,1,""],translate:[3,1,1,""],translate_xy:[3,1,1,""]},geometry_plot:{plot_cubic_lines:[4,1,1,""],plot_lines:[4,1,1,""]},numerical:{fit:[7,0,0,"-"],integration:[7,0,0,"-"],ode:[7,0,0,"-"],ode_model:[7,0,0,"-"]},time_of_day:{days:[8,1,1,""],days_norm:[8,1,1,""],hours:[8,1,1,""],hours_norm:[8,1,1,""],in_seconds:[8,1,1,""],minutes:[8,1,1,""],minutes_norm:[8,1,1,""],seconds:[8,1,1,""],seconds_norm:[8,1,1,""],transform:[8,1,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:function"},terms:{"1st":7,"2\u03c0f":2,"2nd":7,"4th":7,"9fsche_osterformel":1,"\u03bb":2,"\u03bd":2,"\u03c0":2,"\u03c6":2,"\u03c9":2,"boolean":2,"case":7,"char":0,"default":[0,3,7,8],"f\u00fcr":1,"float":[0,2,3,7,8],"fr\u00fchling":1,"function":[6,7],"gau\u00dfsch":1,"gau\u00dfsche_osterformel":1,"int":[0,1,2,3,7],"korrekturgr\u00f6\u00df":1,"m\u00e4rz":1,"m\u00e4rzdatum":1,"new":8,"return":[0,1,3,7,8],"s\u00e4kular":1,"s\u00e4kularzahl":1,"switch":2,"true":2,"vorw\u00e4rt":7,Das:1,The:[0,2,3,7,8],absolut:3,addit:3,against:7,algorithmu:1,als:1,also:2,amplitud:[2,7],analyt:7,angl:3,angle1:3,angle2:3,angular:2,approx:7,approxim:7,april:1,area:7,argument:[2,3],arithmet:0,around:3,arrai:0,ascens:1,ascension_of_jesu:1,ascii:0,assum:3,averag:8,backward:7,base:7,becaus:2,becom:7,begin:7,beta:7,between:[0,2,3],binari:0,bmatrix:7,bool:[0,7],bottom:3,bound:0,boundari:3,build:3,calcul:[1,7,8],call:2,cauchi:7,cdot:7,center:[2,3],chang:[2,3],characterist:2,choos:7,close:0,column:0,common:0,composit:7,condit:[3,7],consecut:0,constant:0,content:6,convert:[0,8],coordin:3,cos:2,cosin:2,cosine_wav:2,cosine_wave_degre:[],counterclockwis:3,creat:0,cubic:3,cubic_deg:3,curv:2,cycl:2,dai:[1,8],data:[6,7],date:[0,2,3,4,6,7,8],datetim:1,datum:1,days_norm:8,ddot:7,decid:3,defin:3,definit:7,deflect:3,deform:3,degener:0,degre:[2,3],den:1,der:1,derform:3,deriv:7,des:1,describ:[2,7],deviat:[2,7],diamet:7,die:1,differ:[0,7],differenti:7,dimens:2,dimension:0,dimenson:0,direct:3,disk:7,disk_nm:7,disk_nmmdk:7,displac:[3,7],distanc:3,distribut:7,divid:7,doe:3,dot:7,each:[2,3],easter:1,easter_fridai:1,easter_mondai:1,easter_sundai:1,eccentr:7,edg:3,either:3,element:[0,3],empti:0,emptyset:0,end:[0,3,7],endpoint:3,entfernung:1,equal:7,equalii:7,equat:7,error:7,ersten:1,euler:7,everi:7,exampl:[3,7],expect:7,explicit:7,explizit:7,f_n:7,factor:3,fail:0,fals:[0,2,7],fassregel:7,file:0,file_nam:0,filenam:0,first:[0,3,7],fit:6,fix:7,float64:7,fnm:7,fold_list:0,follow:0,foral:7,forward:7,fourth:7,fpi:7,frac:[3,7],frequenc:2,fridai:1,from:[0,2,7],full:[0,7],function_cosine_wave_degre:2,function_sine_wave_degre:2,fwhm:7,gamma:7,gau:1,gauss:7,gauss_fit:7,gener:2,geometri:[4,6],geometry_plot:[3,6],get:0,get_id:0,gilt:1,given:[0,3,7],global:[3,7],global_deform:3,govern:7,gregorian:8,gregorianischen:1,half:7,has:[0,7],head:2,height:3,hermit:3,horizont:3,hour:8,hours_norm:8,http:1,ids:0,implicit:7,in_second:8,inc:3,incid:3,index:[0,3,5],index_offset:3,inform:[0,7],initi:7,integr:6,integrand:7,interpol:3,interpolate_hermit:3,interpret:[0,2],interv:7,iter:7,its:2,jahr:1,jesu:1,johann:7,kalend:1,kalendarisch:1,keim:1,kepler:7,keplersch:7,keyword:3,kutta:7,kwarg:[3,4],kx1:0,lag:2,lambda:[2,7],ldot:7,lead:2,left:[0,2,3,7],leftrightarrow:7,length:[0,3,8],leq:7,lhd:3,limit:7,limits_:7,limits_a:7,line:3,linear:2,list:[0,3,7],lns:4,load:0,local:7,lower:[0,7],lst:0,lvd:3,lvert:7,manipul:0,march:1,mathemat:2,mathmat:7,mathrm:7,matplotlib:4,max_iter:7,maximum:7,mean:7,method:7,minumum:0,minut:8,minutes_norm:8,model:7,modul:[5,6],mondai:1,mondparamet:1,mondschaltung:1,move:2,mxn:0,ndarrai:7,necessari:7,necessarili:7,newmark:7,newmark_newtonraphson:7,newmark_newtonraphson_rdk:7,node:3,non:2,none:[0,3,7],normal:8,number:[2,3,7],numer:6,numerisch:7,numpi:7,object:[0,3],object_data:0,occur:2,ode:6,ode_model:6,offset:[7,8],often:2,omega:2,one:[0,3,7],onli:0,open:0,option:3,order:[3,7],ordinari:[2,7],org:1,origin:3,oscil:2,osterentfernung:1,osterformel:1,ostergrenz:1,ostersonntag:1,other:3,otherwis:3,over:2,packag:6,page:5,paramet:[0,1,2,3,7,8],peak:2,pentecost:1,per:[2,7],period:2,phase:2,phi:2,plane:3,plot:3,plot_cubic_lin:4,plot_lin:[3,4],plotter:4,point1:3,point1_i:3,point1_x:3,point2:3,point2_i:3,point2_x:3,point3:3,point4:3,point:[3,7],point_i:3,point_x:3,points1_i:3,polygon:3,polygonzugverfahren:7,popt:7,posit:[2,7],position_norm:8,print:[3,7],problem:7,program:0,propag:2,proport:7,proportion:2,pts:3,pylab:4,quad:7,quadratur:7,radian:[2,3],rang:8,rate:2,read:0,rectangl:3,relat:2,repres:2,residuum:7,rhd:3,right:[0,2,3,7],roation:3,rotat:[3,7],rotate_deg:3,rotate_xi:3,rotation_plan:3,rule:7,rung:7,rvd:3,rvert:7,said:2,same:0,sampl:3,sample_point1_x:3,sample_point2_i:3,sample_point2_x:3,sample_points1_i:3,save_valu:7,scale_i:3,scale_x:3,sche:7,search:5,second:[0,2,3,7,8],seconds_norm:8,segment:7,seq:0,sequenc:0,set:7,shift:2,should:3,side:7,sigma:7,simpson:7,simpsonregel:7,sin:2,sine:2,sine_wav:2,sine_wave_degre:[],sinusoid:2,size:[0,3,7],slope:3,smooth:2,solid:3,solut:7,solv:7,solver:7,sonnenschaltung:1,sonntag:1,sourc:[0,1,2,3,4,7,8],space:7,spacial:1,spatial:2,special:7,specifi:[2,7],speed:2,sqrt:7,squar:[3,7],stabl:7,standard:7,start:[0,2,3],step:[0,7],stop:0,store:0,str:0,straight:3,string:3,struct_tim:8,structur:0,subinterv:7,submodul:6,sum:7,sundai:1,system:[3,7],t_0:7,t_i:7,tabl:3,tagen:1,term:0,text:7,than:[0,3],therefor:7,thi:[2,3],thick:7,thoma:7,ti1:7,time:[2,7,8],time_norm:8,time_of_dai:6,tol:7,toler:7,top:3,torqu:7,transform:8,translat:3,translate_xi:3,trapez:7,trapezium:7,trapezoid:7,trapezregel:7,tupl:[0,3,7],two:[0,3,7],type:[0,1,3,7,8],uid:0,uniqu:0,unique_end:0,unit:2,upper:[0,7],used:7,using:[4,7],usw:1,valu:[7,8],varepsilon:7,variabl:[1,2,7],varianc:7,varphi:2,vec:3,vector:3,veloc:7,verbos:[0,7],verfahren:7,vert_0:7,vert_a:7,vertcal:3,vertic:[3,7],vollmond:1,von:1,wave:2,wavelength:2,wavenumb:2,what:3,where:[2,7],which:[2,7],width:[3,7],wiki:1,wikipedia:1,wise:3,write:0,x_0:7,x_1:[3,7],x_2:[3,7],x_column:0,x_fit:7,x_i:7,x_n:7,xp0:7,xpn:7,xpp0:7,xppn:7,y_1:3,y_2:3,y_column:0,y_fit:7,year:[1,8],zero:2},titles:["data module","date module","function module","geometry module","geometry_plot module","Welcome to pylib\u2019s documentation!","pylib","numerical package","time_of_day module"],titleterms:{"function":2,content:7,data:0,date:1,document:5,fit:7,geometri:3,geometry_plot:4,indic:5,integr:7,modul:[0,1,2,3,4,7,8],numer:7,ode:7,ode_model:7,packag:7,pylib:[5,6],submodul:7,tabl:5,time_of_dai:8,welcom:5}}) \ No newline at end of file +Search.setIndex({docnames:["data","date","function","geometry","geometry_plot","index","mathematics","modules","numerical","time_of_day"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,"sphinx.ext.viewcode":1,sphinx:56},filenames:["data.rst","date.rst","function.rst","geometry.rst","geometry_plot.rst","index.rst","mathematics.rst","modules.rst","numerical.rst","time_of_day.rst"],objects:{"":{"function":[2,0,0,"-"],data:[0,0,0,"-"],date:[1,0,0,"-"],fit:[8,0,0,"-"],geometry:[3,0,0,"-"],geometry_plot:[4,0,0,"-"],integration:[8,0,0,"-"],mathematics:[6,0,0,"-"],numerical:[8,0,0,"-"],ode:[8,0,0,"-"],ode_model:[8,0,0,"-"],time_of_day:[9,0,0,"-"]},"function":{cosine_wave:[2,1,1,""],sine_wave:[2,1,1,""]},"numerical.fit":{gauss:[8,1,1,""],gauss_fit:[8,1,1,""]},"numerical.integration":{trapez:[8,1,1,""]},"numerical.ode":{e1:[8,1,1,""],e2:[8,1,1,""],e4:[8,1,1,""],fpi:[8,1,1,""],i1:[8,1,1,""],newmark_newtonraphson:[8,1,1,""],newmark_newtonraphson_rdk:[8,1,1,""]},"numerical.ode_model":{disk:[8,1,1,""],disk_nm:[8,1,1,""],disk_nmmdk:[8,1,1,""]},data:{fold_list:[0,1,1,""],get_id:[0,1,1,""],load:[0,1,1,""],read:[0,1,1,""],seq:[0,1,1,""],store:[0,1,1,""],unique_ending:[0,1,1,""],write:[0,1,1,""]},date:{"gau\u00dfsche_osterformel":[1,1,1,""],ascension_of_jesus:[1,1,1,""],easter_friday:[1,1,1,""],easter_monday:[1,1,1,""],easter_sunday:[1,1,1,""],pentecost:[1,1,1,""]},geometry:{angle:[3,1,1,""],cubic:[3,1,1,""],cubic_deg:[3,1,1,""],cubics:[3,1,1,""],distance:[3,1,1,""],interpolate_hermite:[3,1,1,""],line:[3,1,1,""],lines:[3,1,1,""],rectangle:[3,1,1,""],rotate:[3,1,1,""],rotate_deg:[3,1,1,""],rotate_xy:[3,1,1,""],square:[3,1,1,""],translate:[3,1,1,""],translate_xy:[3,1,1,""]},geometry_plot:{plot_cubic_lines:[4,1,1,""],plot_lines:[4,1,1,""]},mathematics:{lcm:[6,1,1,""]},numerical:{fit:[8,0,0,"-"],integration:[8,0,0,"-"],ode:[8,0,0,"-"],ode_model:[8,0,0,"-"]},time_of_day:{days:[9,1,1,""],days_norm:[9,1,1,""],hours:[9,1,1,""],hours_norm:[9,1,1,""],in_seconds:[9,1,1,""],minutes:[9,1,1,""],minutes_norm:[9,1,1,""],seconds:[9,1,1,""],seconds_norm:[9,1,1,""],transform:[9,1,1,""]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:function"},terms:{"1st":8,"2\u03c0f":2,"2nd":8,"4th":8,"9fsche_osterformel":1,"\u03bb":2,"\u03bd":2,"\u03c0":2,"\u03c6":2,"\u03c9":2,"boolean":2,"case":8,"char":0,"default":[0,3,8,9],"f\u00fcr":1,"float":[0,2,3,8,9],"fr\u00fchling":1,"function":[6,7,8],"gau\u00dfsch":1,"gau\u00dfsche_osterformel":1,"int":[0,1,2,3,8],"korrekturgr\u00f6\u00df":1,"m\u00e4rz":1,"m\u00e4rzdatum":1,"new":9,"return":[0,1,3,8,9],"s\u00e4kular":1,"s\u00e4kularzahl":1,"switch":2,"true":2,"vorw\u00e4rt":8,Das:1,The:[0,2,3,8,9],absolut:3,addit:3,against:8,algorithmu:1,als:1,also:2,amplitud:[2,8],analyt:8,angl:3,angle1:3,angle2:3,angular:2,approx:8,approxim:8,april:1,area:8,argument:[2,3],arithmet:0,around:3,arrai:0,ascens:1,ascension_of_jesu:1,ascii:0,assum:3,averag:9,backward:8,base:8,becaus:2,becom:8,begin:8,beta:8,between:[0,2,3],binari:0,bmatrix:8,bool:[0,8],bottom:3,bound:0,boundari:3,build:3,calcul:[1,8,9],call:2,cauchi:8,cdot:8,center:[2,3],chang:[2,3],characterist:2,choos:8,close:0,column:0,common:[0,6],composit:8,comput:6,condit:[3,8],consecut:0,constant:0,content:7,convert:[0,9],coordin:3,cos:2,cosin:2,cosine_wav:2,counterclockwis:3,creat:0,cubic:3,cubic_deg:3,curv:2,cycl:2,dai:[1,9],data:[7,8],date:[0,2,3,4,6,7,8,9],datetim:1,datum:1,days_norm:9,ddot:8,decid:3,defin:3,definit:8,deflect:3,deform:3,degener:0,degre:[2,3],den:1,der:1,derform:3,deriv:8,des:1,describ:[2,8],deviat:[2,8],diamet:8,die:1,differ:[0,8],differenti:8,dimens:2,dimension:0,dimenson:0,direct:3,disk:8,disk_nm:8,disk_nmmdk:8,displac:[3,8],distanc:3,distribut:8,divid:8,doe:3,dot:8,each:[2,3],easter:1,easter_fridai:1,easter_mondai:1,easter_sundai:1,eccentr:8,edg:3,either:3,element:[0,3],empti:0,emptyset:0,end:[0,3,8],endpoint:3,entfernung:1,equal:8,equalii:8,equat:8,error:8,ersten:1,euler:8,everi:8,exampl:[3,8],expect:8,explicit:8,explizit:8,f_n:8,factor:3,fail:0,fals:[0,2,8],fassregel:8,file:0,file_nam:0,filenam:0,first:[0,3,8],fit:7,fix:8,float64:8,fnm:8,fold_list:0,follow:0,foral:8,forward:8,fourth:8,fpi:8,frac:[3,8],frequenc:2,fridai:1,from:[0,2,8],full:[0,8],function_cosine_wave_degre:2,function_sine_wave_degre:2,fwhm:8,gamma:8,gau:1,gauss:8,gauss_fit:8,gener:2,geometri:[4,7],geometry_plot:[3,7],get:0,get_id:0,gilt:1,given:[0,3,8],global:[3,8],global_deform:3,govern:8,gregorian:9,gregorianischen:1,half:8,has:[0,8],head:2,height:3,hermit:3,horizont:3,hour:9,hours_norm:9,http:1,ids:0,implicit:8,in_second:9,inc:3,incid:3,index:[0,3,5],index_offset:3,inform:[0,8],initi:8,integr:7,integrand:8,interpol:3,interpolate_hermit:3,interpret:[0,2],interv:8,iter:8,its:2,jahr:1,jesu:1,johann:8,kalend:1,kalendarisch:1,keim:1,kepler:8,keplersch:8,keyword:3,kutta:8,kwarg:[3,4],kx1:0,lag:2,lambda:[2,8],lcm:6,ldot:8,lead:2,left:[0,2,3,8],leftrightarrow:8,length:[0,3,9],leq:8,lhd:3,limit:8,limits_:8,limits_a:8,line:3,linear:2,list:[0,3,8],lns:4,load:0,local:8,lower:[0,8],lowest:6,lst:0,lvd:3,lvert:8,manipul:0,march:1,mathemat:[2,7],mathmat:8,mathrm:8,matplotlib:4,max_iter:8,maximum:8,mean:8,method:8,minumum:0,minut:9,minutes_norm:9,model:8,modul:[5,7],mondai:1,mondparamet:1,mondschaltung:1,move:2,multipl:6,mxn:0,ndarrai:8,necessari:8,necessarili:8,newmark:8,newmark_newtonraphson:8,newmark_newtonraphson_rdk:8,node:3,non:2,none:[0,3,8],normal:9,number:[2,3,8],numer:7,numerisch:8,numpi:8,object:[0,3],object_data:0,occur:2,ode:7,ode_model:7,offset:[8,9],often:2,omega:2,one:[0,3,8],onli:0,open:0,option:3,order:[3,8],ordinari:[2,8],org:1,origin:3,oscil:2,osterentfernung:1,osterformel:1,ostergrenz:1,ostersonntag:1,other:3,otherwis:3,over:2,packag:7,page:5,paramet:[0,1,2,3,8,9],peak:2,pentecost:1,per:[2,8],period:2,phase:2,phi:2,plane:3,plot:3,plot_cubic_lin:4,plot_lin:[3,4],plotter:4,point1:3,point1_i:3,point1_x:3,point2:3,point2_i:3,point2_x:3,point3:3,point4:3,point:[3,8],point_i:3,point_x:3,points1_i:3,polygon:3,polygonzugverfahren:8,popt:8,posit:[2,8],position_norm:9,print:[3,8],problem:8,program:0,propag:2,proport:8,proportion:2,pts:3,pylab:4,quad:8,quadratur:8,radian:[2,3],rang:9,rate:2,read:0,rectangl:3,relat:2,repres:2,residuum:8,rhd:3,right:[0,2,3,8],roation:3,rotat:[3,8],rotate_deg:3,rotate_xi:3,rotation_plan:3,rule:8,rung:8,rvd:3,rvert:8,said:2,same:0,sampl:3,sample_point1_x:3,sample_point2_i:3,sample_point2_x:3,sample_points1_i:3,save_valu:8,scale_i:3,scale_x:3,sche:8,search:5,second:[0,2,3,8,9],seconds_norm:9,segment:8,seq:0,sequenc:0,set:8,shift:2,should:3,side:8,sigma:8,simpson:8,simpsonregel:8,sin:2,sine:2,sine_wav:2,sinusoid:2,size:[0,3,8],slope:3,smooth:2,solid:3,solut:8,solv:8,solver:8,sonnenschaltung:1,sonntag:1,sourc:[0,1,2,3,4,6,8,9],space:8,spacial:1,spatial:2,special:8,specifi:[2,8],speed:2,sqrt:8,squar:[3,8],stabl:8,standard:8,start:[0,2,3],step:[0,8],stop:0,store:0,str:0,straight:3,string:3,struct_tim:9,structur:0,subinterv:8,submodul:7,sum:8,sundai:1,system:[3,8],t_0:8,t_i:8,tabl:3,tagen:1,term:0,text:8,than:[0,3],therefor:8,thi:[2,3],thick:8,thoma:8,ti1:8,time:[2,8,9],time_norm:9,time_of_dai:7,tol:8,toler:8,top:3,torqu:8,transform:9,translat:3,translate_xi:3,trapez:8,trapezium:8,trapezoid:8,trapezregel:8,tupl:[0,3,8],two:[0,3,8],type:[0,1,3,8,9],uid:0,uniqu:0,unique_end:0,unit:2,upper:[0,8],used:8,using:[4,8],usw:1,valu:[8,9],varepsilon:8,variabl:[1,2,8],varianc:8,varphi:2,vec:3,vector:3,veloc:8,verbos:[0,8],verfahren:8,vert_0:8,vert_a:8,vertcal:3,vertic:[3,8],vollmond:1,von:1,wave:2,wavelength:2,wavenumb:2,what:3,where:[2,8],which:[2,8],width:[3,8],wiki:1,wikipedia:1,wise:3,write:0,x_0:8,x_1:[3,8],x_2:[3,8],x_column:0,x_fit:8,x_i:8,x_n:8,xp0:8,xpn:8,xpp0:8,xppn:8,y_1:3,y_2:3,y_column:0,y_fit:8,year:[1,9],zero:2},titles:["data module","date module","function module","geometry module","geometry_plot module","Welcome to pylib\u2019s documentation!","mathematics module","pylib","numerical package","time_of_day module"],titleterms:{"function":2,content:8,data:0,date:1,document:5,fit:8,geometri:3,geometry_plot:4,indic:5,integr:8,mathemat:6,modul:[0,1,2,3,4,6,8,9],numer:8,ode:8,ode_model:8,packag:8,pylib:[5,7],submodul:8,tabl:5,time_of_dai:9,welcom:5}}) \ No newline at end of file diff --git a/docs/source/mathematics.rst b/docs/source/mathematics.rst new file mode 100644 index 0000000..8447d59 --- /dev/null +++ b/docs/source/mathematics.rst @@ -0,0 +1,7 @@ +mathematics module +================== + +.. automodule:: mathematics + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/modules.rst b/docs/source/modules.rst index 31ce243..192f6ab 100644 --- a/docs/source/modules.rst +++ b/docs/source/modules.rst @@ -9,5 +9,6 @@ pylib function geometry geometry_plot + mathematics numerical time_of_day diff --git a/pylib/mathematics.py b/pylib/mathematics.py new file mode 100644 index 0000000..66f4910 --- /dev/null +++ b/pylib/mathematics.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +"""Mathematical functions. + +:Date: 2019-10-30 + +.. module:: mathematics + :platform: *nix, Windows + :synopsis: Mathematical functions. + +.. moduleauthor:: Daniel Weschke +""" +from math import gcd + +def lcm(a, b): + """Compute the lowest common multiple of a and b""" + return a/gcd(a, b)*b
    Numerical integration.
     
    + m
    + mathematics (*nix, Windows) + Mathematical functions.
     
    n