From 88d3a2430cb2beff03e3ade5abdf03e11bf2d478 Mon Sep 17 00:00:00 2001 From: Hans Dembinski Date: Mon, 25 Apr 2016 09:14:08 -0400 Subject: [PATCH] more docs --- doc/html/index.html | 2 +- doc/html/motivation.html | 1 + doc/html/notes.html | 2 +- doc/html/searchindex.js | 2 +- doc/html/types.html | 12 ++++++------ doc/sphinx/motivation.rst | 2 ++ doc/sphinx/notes.rst | 2 +- doc/sphinx/types.rst | 12 ++++++------ 8 files changed, 19 insertions(+), 16 deletions(-) diff --git a/doc/html/index.html b/doc/html/index.html index a5377ab3..db17cdbc 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -64,7 +64,7 @@
  • Types
  • diff --git a/doc/html/motivation.html b/doc/html/motivation.html index ad4e9b5e..e7a936fb 100644 --- a/doc/html/motivation.html +++ b/doc/html/motivation.html @@ -43,6 +43,7 @@

    Motivation

    There is a lack of a widely-used, free histogram class. While it is easy to write an 1-dimensional histogram, writing an n-dimensional histogram poses more of a challenge. If you add serialization and Python/Numpy support onto the wish-list, the air becomes thin.

    The main competitor is the ROOT framework. The histogram in this project is designed to be more convenient to use, and as fast or faster than the equivalent ROOT histograms. It comes without heavy baggage, instead it has a clean and modern C++ design which follows the advice given in popular C++ books, like those of Meyers and Sutter and Alexandrescu.

    +

    Two of the main design goals are to conveniently hide the internal details on how things are counted, and to use the same interface for 1-dimensional and n-dimensional histograms. The count storage is an implementation detail, chosen automatically to be fast and efficient. The histogram should just work, users shouldn’t be forced to make choices among several storage options everytime they encounter a new data set.

    diff --git a/doc/html/notes.html b/doc/html/notes.html index 4a72df17..bbb91002 100644 --- a/doc/html/notes.html +++ b/doc/html/notes.html @@ -80,7 +80,7 @@
    Properties
    Getter/setter-like functions are wrapped as properties.
    Keyword-based parameters
    -
    C++ member functions histogram::fill() and histogram::wfill() are wrapped by the single Python member function histogram.fill()
    +
    C++ member functions histogram::fill() and histogram::wfill() are wrapped by the single Python member function histogram.fill() with an optional keyword parameter w to pass a weight.
    C++ convenience
    C++ member function histogram::bins() is omitted on the Python side, since it is very easy to just query this directly from the axis object in Python. On the C++ side, this would require a extra type cast or applying a visitor.
    diff --git a/doc/html/searchindex.js b/doc/html/searchindex.js index f6960884..5a9c9d52 100644 --- a/doc/html/searchindex.js +++ b/doc/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({envversion:47,filenames:["changelog","functions","index","intro","motivation","notes","rationale","references","tutorial","types"],objects:{"":{"category_axis::category_axis":[9,1,1,"_CPPv2N13category_axis13category_axisERKNSt6vectorINSt6stringEEE"],"histogram::axis":[9,1,1,"_CPPv2I0ENK9histogram4axisEj"],"histogram::axis::T":[9,3,1,"_CPPv2I0ENK9histogram4axisEj"],"histogram::bins":[9,1,1,"_CPPv2NK9histogram4binsEj"],"histogram::depth":[9,1,1,"_CPPv2NK9histogram5depthEv"],"histogram::dim":[9,1,1,"_CPPv2NK9histogram3dimEv"],"histogram::fill":[9,1,1,"_CPPv2N9histogram4fillEdz"],"histogram::fill_c":[9,1,1,"_CPPv2N9histogram6fill_cEjPKd"],"histogram::histogram":[9,1,1,"_CPPv2N9histogram9histogramERK9axis_typez"],"histogram::operator+=":[9,1,1,"_CPPv2NK9histogrampLERK9histogram"],"histogram::operator==":[9,1,1,"_CPPv2NK9histogrameqERK9histogram"],"histogram::shape":[9,1,1,"_CPPv2NK9histogram5shapeEj"],"histogram::sum":[9,1,1,"_CPPv2NK9histogram3sumEv"],"histogram::value":[9,1,1,"_CPPv2NK9histogram5valueEiz"],"histogram::value_c":[9,1,1,"_CPPv2NK9histogram7value_cEjPKi"],"histogram::variance":[9,1,1,"_CPPv2NK9histogram8varianceEiz"],"histogram::variance_c":[9,1,1,"_CPPv2NK9histogram10variance_cEjPKi"],"histogram::wfill":[9,1,1,"_CPPv2N9histogram5wfillEjPKdd"],"histogram::wfill_c":[9,1,1,"_CPPv2N9histogram7wfill_cEjPKdd"],"integer_axis::integer_axis":[9,1,1,"_CPPv2N12integer_axis12integer_axisEiiRKNSt6stringEb"],"polar_axis::polar_axis":[9,1,1,"_CPPv2N10polar_axis10polar_axisEjdRKNSt6stringE"],"regular_axis::regular_axis":[9,1,1,"_CPPv2N12regular_axis12regular_axisEjddRKNSt6stringEb"],"variable_axis::variable_axis":[9,1,1,"_CPPv2N13variable_axis13variable_axisERKNSt6vectorIdEERKNSt6stringEb"],axis_type:[9,0,1,"_CPPv29axis_type"],bins:[9,1,1,"_CPPv2NK4binsEv"],category_axis:[9,2,1,"_CPPv213category_axis"],histogram:[9,4,0,"-"],integer_axis:[9,2,1,"_CPPv212integer_axis"],label:[9,1,1,"_CPPv2NK5labelEv"],polar_axis:[9,2,1,"_CPPv210polar_axis"],regular_axis:[9,2,1,"_CPPv212regular_axis"],uoflow:[9,1,1,"_CPPv2NK6uoflowEv"],variable_axis:[9,2,1,"_CPPv213variable_axis"]},"histogram.histogram":{"__init__":[9,6,1,""],axis:[9,6,1,""],dim:[9,7,1,""],fill:[9,6,1,""],shape:[9,6,1,""],value:[9,6,1,""],variance:[9,6,1,""]},histogram:{category_axis:[9,5,1,""],histogram:[9,5,1,""],integer_axis:[9,5,1,""],polar_axis:[9,5,1,""],regular_axis:[9,5,1,""],variable_axis:[9,5,1,""]}},objnames:{"0":["cpp","type","C++ type"],"1":["cpp","function","C++ function"],"2":["cpp","class","C++ class"],"3":["cpp","templateParam","templateParam"],"4":["py","module","Python module"],"5":["py","class","Python class"],"6":["py","method","Python method"],"7":["py","attribute","Python attribute"]},objtypes:{"0":"cpp:type","1":"cpp:function","2":"cpp:class","3":"cpp:templateParam","4":"py:module","5":"py:class","6":"py:method","7":"py:attribute"},terms:{"16ul":[],"16x":9,"__init__":9,"_object":[],"_optional_":[],"byte":[6,9],"case":[3,5,6,9],"class":[],"const":9,"default":[5,6],"float":9,"import":3,"int":9,"new":6,"public":9,"return":9,"short":[],"switch":6,"true":9,"var":[],"void":9,"while":[4,6],about:3,abov:9,accept:3,access:6,accompani:2,activ:5,actual:9,adapt:6,add:[4,9],address:9,advic:4,after:9,agre:9,air:4,alexandrescu:4,all:9,alloc:9,allow:[3,9],alongsid:6,also:[6,9],among:[6,9],amount:6,analys:3,analysi:[3,6],ancillari:[],angl:[6,9],annot:8,anoth:[6,9],appli:[5,6],applic:3,arbitrari:[],archiv:6,arg1:[],arg2:[],arg:[],around:9,arrai:[2,3,9],ascii:6,assert:9,astroparticl:6,avail:6,axi:[],axis_typ:9,back:6,baggag:4,barrier:3,base:[5,6,9],basic:3,basic_histogram:9,becaus:[],becom:[4,6],befor:9,belong:5,below:[],benefit:[],between:6,big:6,bin:[],binari:6,bind:[3,5,6],bla:[],book:4,bool:9,boost:[2,5,6,9],boost_assert:[],boost_histogram_axis_limit:9,both:6,boundari:2,breviti:9,buffer:[3,9],build:[],build_check:5,cach:[],call:[5,9],can:[2,3,5,6,8,9],cast:[5,9],categor:6,categori:9,category_axi:9,caveat:5,challeng:4,chang:9,charact:9,check:[],choic:6,circular:9,clean:4,clone:5,cluster:3,cmake:5,cmake_install_prefix:5,code:[3,5,6],collect:6,com:5,come:[3,4],common:9,commonli:9,compactli:3,competitor:4,complet:[2,3],complex:[3,6],complex_cpp_modul:3,comput:6,concern:5,congruenc:[],consid:9,consist:[],constructor:9,consum:[3,6,9],contain:[2,6],content:[],contigu:9,continu:3,conveni:[],convers:9,convert:[2,9],copi:[2,3],copyright:2,correl:6,could:9,couldn:5,count:[],cpp:[],creat:[3,9],ctest:5,current:9,curs:6,data:[2,3,6,9],decad:6,defin:[6,9],delai:9,dembinski:2,dens:6,depend:[],depth:[6,9],deriv:9,design:[],detail:[3,9],determin:[],deviat:9,dict:[],differ:6,dim:9,dimens:[3,6,9],dimension:[2,3,4,6,9],directli:[5,9],directori:[],disabl:9,disc:3,discrimin:9,disk:3,dist:5,distribut:[2,3,6,7,9],disturb:6,document:5,doe:[3,9],domain:[3,9],doubl:[6,9],doug:6,dozent:6,driven:3,duti:2,each:[6,9],eas:2,easi:[2,4,5],edg:9,effici:[],either:[3,6],eleg:5,element:6,embed:9,empti:3,enabl:9,encapsul:[6,9],encod:6,encount:6,end:9,ensur:6,enumer:9,equal:[6,9],equival:4,error:9,estim:[],even:9,event:6,everi:3,everytim:6,exampl:[5,6,8],excel:2,except:[5,9],exist:5,expect:9,experi:6,exploit:[],extra:[5,6,9],extract:3,extrem:9,fast:[3,4],faster:4,featur:6,few:5,field:[6,9],figur:5,file:2,fill:[2,3,5,6,9],fill_c:9,first:[6,9],flag:5,follow:[4,9],forc:6,format:9,fortun:6,framework:[4,7],free:[4,9],friendli:[],from:[2,3,5,6,9],fulli:2,further:6,futur:6,gener:6,get:6,getter:5,git:5,github:5,give:[],given:4,goal:2,great:6,grow:6,half:6,han:2,hand:9,have:[3,5,6,9],hdembinski:5,heavi:[2,4],help:8,hidden:[],hide:3,high:[6,9],hold:9,how:[],howev:6,hpp:9,http:[],ident:9,idx:9,implement:[2,3,5,6,9],implicitli:5,includ:[5,9],increas:6,indent:5,independ:5,index:[6,9],indic:9,individu:[6,9],inform:[3,5],inherit:9,instal:[],instanc:[3,9],instead:[3,4,5],instruct:5,integ:[6,9],integer_axi:9,interest:3,interfac:[],intern:[3,9],introduct:[],invalid:9,itself:[6,9],just:[3,5,6,9],keep:9,kei:[],keyword:5,kwd:[],label:9,lack:4,languag:[],larg:[3,6],larger:9,last:[6,9],lead:6,length:[6,9],less:9,let:6,librari:[2,3,5,8,9],licens:2,license_1_0:[],like:[3,4,5,6,9],limit:3,linear:9,list:4,log:9,logic_error:9,look:6,loss:3,lot:3,low:9,mai:3,main:[4,5],make:[5,6],manag:9,mani:[6,9],manual:5,mass:[],matter:9,max:9,maximum:3,mcilroi:6,mean:3,member:[5,9],memori:[],merg:3,messag:5,method:[],meyer:4,min:9,minor:[],mkdir:5,mode:3,modern:4,modul:5,more:[3,4,5,6,8,9],most:[5,9],move:2,much:9,must:6,namespac:9,natur:6,need:[5,6,9],neg:9,non:[],none:9,normal:[3,6],note:[],now:3,number:[6,9],numpi:[2,3,4,5,6,9],object:[5,6,9],obviou:[],occur:9,off:6,offset:9,often:[3,6],omit:[5,9],onli:9,onto:4,oper:9,optim:2,option:[5,6,9],order:9,org:[],origin:3,other:[6,9],otherwis:9,out:5,output:5,over:[2,3,6],overflow:[6,9],packag:5,parallel:3,param:[],paramet:[5,9],particl:6,partli:6,pass:[3,9],path:5,per:6,perform:[],perhap:[],persist:3,phase:9,physic:6,pick:5,pickabl:9,pickl:[2,3,6],platform:5,plot:6,point:9,poisson:[6,7,9],polar_axi:9,popular:4,portabl:6,pose:4,possibl:[3,6],potenti:[],power:[],precis:6,prefer:9,previou:9,principl:[],print:5,priori:6,problem:[5,6,8,9],project:[2,4],propag:[7,9],proper:5,properi:[],properti:5,provid:[3,5,6],python:[],quantiti:3,queri:5,quickli:6,random:3,rang:9,rational:[],real:[6,8,9],reason:9,reduc:6,regular_axi:[3,9],releas:[],repres:3,represent:6,requir:5,respect:[5,6],result:3,right:[5,9],root:[4,6,7],run:[5,6,9],run_fil:3,runtim:9,safe:3,same:[3,6,9],scheme:9,second:[6,9],see:2,self:9,separ:9,sequenc:[6,9],serial:[],serv:6,set:[3,6],setter:5,sever:[3,6,9],shape:9,should:6,shouldn:6,side:[5,6,9],signatur:[3,9],simpl:3,simul:6,sinc:[5,6,9],singl:[3,5,9],size:[6,9],smallest:6,softwar:2,solv:8,some:5,sort:6,space:[3,9],speed:[2,9],sphinx:5,spread:6,squar:6,standard:[6,9],start:[6,9],static_vector:[],statist:3,std:[6,9],storag:[3,6,9],store:[6,9],strategi:[],stream:2,strictli:5,string:[6,9],structur:[],studi:6,style:[],subject:6,submit:2,sum:[3,6,9],suppli:9,support:[],suppress:[],sure:6,sutter:4,system:6,templat:9,test:[],text_oarch:6,than:4,thei:[3,5,6,9],theori:[6,9],thi:[2,3,4,5,6,9],thin:4,thing:[3,5,6],those:4,thrown:9,time:[5,9],too:3,tool:3,track:9,transpar:[],tupl:9,turn:[5,6],tutori:[],two:[6,9],txt:[],type:[],typedef:9,typenam:9,typic:6,uncertainti:[7,9],under:[2,6],underflow:[6,9],unfortun:6,unsign:9,until:9,unweight:[6,9],uoflow:9,usabl:6,user:[3,6],valu:[6,9],value_c:9,vari:[6,9],variabl:[3,6,9],variable_axi:9,varianc:[],variance_c:9,variant:9,vector:[6,9],veri:5,version:[2,9],view:3,visitor:5,void_:[],wai:[5,6],weight:[],well:6,wfill:[5,9],wfill_c:9,what:[],whatev:6,when:[5,6],where:[5,9],whether:9,which:[3,4,5,6,9],who:3,why:9,wide:[4,9],width:[6,9],wish:4,without:[2,3,4],work:[3,6],worri:3,would:[5,6],wrap:[5,9],write:4,written:[3,6],www:[],yet:5,yield:9,you:[3,4],zen:6,zero:[]},titles:["CHANGELOG","Functions","Histogram","Introduction","Motivation","Notes","Rationale","References","Tutorial","Types"],titleterms:{"class":9,"function":1,axi:9,bin:6,build:5,cach:[],changelog:0,check:5,congruenc:[],consist:5,content:2,conveni:6,count:6,depend:5,descript:2,design:6,effici:6,estim:6,friendli:[],histogram:[2,9],how:5,instal:5,interfac:[5,6,9],introduct:3,languag:6,memori:6,motiv:4,note:5,perform:6,power:6,principl:6,python:[5,9],rational:6,refer:7,serial:6,strategi:6,support:[],suppress:6,test:5,transpar:6,tutori:8,type:9,varianc:6,weight:6,zero:6}}) \ No newline at end of file +Search.setIndex({envversion:47,filenames:["changelog","functions","index","intro","motivation","notes","rationale","references","tutorial","types"],objects:{"":{"category_axis::category_axis":[9,1,1,"_CPPv2N13category_axis13category_axisERKNSt6vectorINSt6stringEEE"],"histogram::axis":[9,1,1,"_CPPv2I0ENK9histogram4axisEj"],"histogram::axis::T":[9,3,1,"_CPPv2I0ENK9histogram4axisEj"],"histogram::bins":[9,1,1,"_CPPv2NK9histogram4binsEj"],"histogram::depth":[9,1,1,"_CPPv2NK9histogram5depthEv"],"histogram::dim":[9,1,1,"_CPPv2NK9histogram3dimEv"],"histogram::fill":[9,1,1,"_CPPv2N9histogram4fillEdz"],"histogram::fill_c":[9,1,1,"_CPPv2N9histogram6fill_cEjPKd"],"histogram::histogram":[9,1,1,"_CPPv2N9histogram9histogramERK9axis_typez"],"histogram::operator+=":[9,1,1,"_CPPv2NK9histogrampLERK9histogram"],"histogram::operator==":[9,1,1,"_CPPv2NK9histogrameqERK9histogram"],"histogram::shape":[9,1,1,"_CPPv2NK9histogram5shapeEj"],"histogram::sum":[9,1,1,"_CPPv2NK9histogram3sumEv"],"histogram::value":[9,1,1,"_CPPv2NK9histogram5valueEiz"],"histogram::value_c":[9,1,1,"_CPPv2NK9histogram7value_cEjPKi"],"histogram::variance":[9,1,1,"_CPPv2NK9histogram8varianceEiz"],"histogram::variance_c":[9,1,1,"_CPPv2NK9histogram10variance_cEjPKi"],"histogram::wfill":[9,1,1,"_CPPv2N9histogram5wfillEjPKdd"],"histogram::wfill_c":[9,1,1,"_CPPv2N9histogram7wfill_cEjPKdd"],"integer_axis::integer_axis":[9,1,1,"_CPPv2N12integer_axis12integer_axisEiiRKNSt6stringEb"],"polar_axis::polar_axis":[9,1,1,"_CPPv2N10polar_axis10polar_axisEjdRKNSt6stringE"],"regular_axis::regular_axis":[9,1,1,"_CPPv2N12regular_axis12regular_axisEjddRKNSt6stringEb"],"variable_axis::variable_axis":[9,1,1,"_CPPv2N13variable_axis13variable_axisERKNSt6vectorIdEERKNSt6stringEb"],axis_type:[9,0,1,"_CPPv29axis_type"],bins:[9,1,1,"_CPPv2NK4binsEv"],category_axis:[9,2,1,"_CPPv213category_axis"],histogram:[9,4,0,"-"],integer_axis:[9,2,1,"_CPPv212integer_axis"],label:[9,1,1,"_CPPv2NK5labelEv"],polar_axis:[9,2,1,"_CPPv210polar_axis"],regular_axis:[9,2,1,"_CPPv212regular_axis"],uoflow:[9,1,1,"_CPPv2NK6uoflowEv"],variable_axis:[9,2,1,"_CPPv213variable_axis"]},"histogram.histogram":{"__init__":[9,6,1,""],axis:[9,6,1,""],dim:[9,7,1,""],fill:[9,6,1,""],shape:[9,6,1,""],value:[9,6,1,""],variance:[9,6,1,""]},histogram:{category_axis:[9,5,1,""],histogram:[9,5,1,""],integer_axis:[9,5,1,""],polar_axis:[9,5,1,""],regular_axis:[9,5,1,""],variable_axis:[9,5,1,""]}},objnames:{"0":["cpp","type","C++ type"],"1":["cpp","function","C++ function"],"2":["cpp","class","C++ class"],"3":["cpp","templateParam","templateParam"],"4":["py","module","Python module"],"5":["py","class","Python class"],"6":["py","method","Python method"],"7":["py","attribute","Python attribute"]},objtypes:{"0":"cpp:type","1":"cpp:function","2":"cpp:class","3":"cpp:templateParam","4":"py:module","5":"py:class","6":"py:method","7":"py:attribute"},terms:{"16ul":[],"16x":9,"__init__":9,"_object":[],"_optional_":[],"byte":[6,9],"case":[3,5,6,9],"class":[],"const":9,"default":[5,6],"float":9,"import":3,"int":9,"new":[4,6],"public":9,"return":9,"short":[],"switch":6,"true":9,"var":[],"void":9,"while":[4,6],about:3,abov:9,accept:3,access:6,accompani:2,activ:5,actual:9,adapt:6,add:[4,9],address:9,advic:4,after:9,agre:9,air:4,alexandrescu:4,all:9,alloc:9,allow:[3,9],alongsid:6,also:[6,9],among:[4,6,9],amount:6,analys:3,analysi:[3,6],ancillari:[],angl:[6,9],annot:8,anoth:[6,9],appli:[5,6],applic:3,arbitrari:[],archiv:6,arg1:[],arg2:[],arg:[],argument:9,around:9,arrai:[2,3,9],ascii:6,assert:9,astroparticl:6,automat:4,avail:6,axi:[],axis_typ:9,back:6,baggag:4,barrier:3,base:[5,6,9],basic:3,basic_histogram:9,becaus:[],becom:[4,6],befor:9,belong:5,below:[],benefit:[],between:6,big:6,bin:[],binari:6,bind:[3,5,6],bla:[],book:4,bool:9,boost:[2,5,6,9],boost_assert:[],boost_histogram_axis_limit:9,both:6,boundari:2,breviti:9,buffer:[3,9],build:[],build_check:5,cach:[],call:[5,9],can:[2,3,5,6,8,9],cast:[5,9],categor:6,categori:9,category_axi:9,caveat:5,challeng:4,chang:9,charact:9,check:[],choic:[4,6],chosen:4,circular:9,clean:4,clone:5,cluster:3,cmake:5,cmake_install_prefix:5,code:[3,5,6],collect:6,com:5,come:[3,4],common:9,commonli:9,compactli:3,competitor:4,complet:[2,3],complex:[3,6],complex_cpp_modul:3,comput:6,concern:5,congruenc:[],consid:9,consist:[],constructor:9,consum:[3,6,9],contain:[2,6],content:[],contigu:9,continu:3,conveni:[],convers:9,convert:[2,9],copi:[2,3],copyright:2,correl:6,could:9,couldn:5,count:[],cpp:[],creat:[3,9],ctest:5,current:9,curs:6,data:[2,3,4,6,9],decad:6,defin:[6,9],delai:9,dembinski:2,dens:6,depend:[],depth:[6,9],deriv:9,design:[],detail:[3,4,9],determin:[],deviat:9,dict:[],differ:6,dim:9,dimens:[3,6,9],dimension:[2,3,4,6,9],directli:[5,9],directori:[],disabl:[],disc:3,discrimin:9,disk:3,dist:5,distribut:[2,3,6,7,9],disturb:6,document:5,doe:[3,9],domain:[3,9],doubl:[6,9],doug:6,dozent:6,driven:3,duti:2,each:[6,9],eas:2,easi:[2,4,5],edg:9,effici:[],either:[3,6],eleg:5,element:6,embed:9,empti:3,enabl:9,encapsul:[6,9],encod:6,encount:[4,6],end:9,ensur:6,enumer:9,equal:[6,9],equival:4,error:9,estim:[],even:9,event:6,everi:3,everytim:[4,6],exampl:[5,6,8],excel:2,except:[5,9],exist:5,expect:9,experi:6,exploit:[],extra:[5,6,9],extract:3,extrem:9,fast:[3,4],faster:4,featur:6,few:5,field:[6,9],figur:5,file:2,fill:[2,3,5,6,9],fill_c:9,first:[6,9],flag:5,follow:[4,9],forc:[4,6],format:9,fortun:6,framework:[4,7],free:[4,9],friendli:[],from:[2,3,5,6,9],fulli:2,further:6,futur:6,gener:6,get:6,getter:5,git:5,github:5,give:[],given:4,goal:[2,4],great:6,grow:6,half:6,han:2,hand:9,have:[3,5,6,9],hdembinski:5,heavi:[2,4],help:8,hidden:[],hide:[3,4],high:[6,9],hold:9,how:[],howev:6,hpp:9,http:[],ident:9,idx:9,implement:[2,3,4,5,6,9],implicitli:5,includ:[5,9],increas:6,indent:5,independ:5,index:[6,9],indic:9,individu:[6,9],inform:[3,5],inherit:9,instal:[],instanc:[3,9],instead:[3,4,5],instruct:5,integ:[6,9],integer_axi:9,interest:3,interfac:[],intern:[3,4,9],introduct:[],invalid:9,itself:[6,9],just:[3,4,5,6,9],keep:9,kei:[],keyword:5,kwd:[],label:9,lack:4,languag:[],larg:[3,6],larger:9,last:[6,9],lead:6,length:[6,9],less:9,let:6,librari:[2,3,5,8,9],licens:2,license_1_0:[],like:[3,4,5,6,9],limit:3,linear:9,list:4,log:9,logic_error:9,look:6,loss:3,lot:3,low:9,mai:3,main:[4,5],make:[4,5,6],manag:9,mani:[6,9],manual:5,mass:[],matter:9,max:9,maximum:3,mcilroi:6,mean:3,member:[5,9],memori:[],merg:3,messag:5,method:[],meyer:4,min:9,minor:[],mkdir:5,mode:3,modern:4,modul:5,more:[3,4,5,6,8,9],most:[5,9],move:2,much:9,must:6,namespac:9,natur:6,need:[5,6,9],neg:9,non:[],none:9,normal:[3,6],note:[],now:3,number:[6,9],numpi:[2,3,4,5,6,9],object:[5,6,9],obviou:[],occur:9,off:6,offset:9,often:[3,6],omit:[5,9],onc:9,onli:9,onto:4,oper:9,optim:2,option:[4,5,6,9],order:9,org:[],origin:3,other:[6,9],otherwis:9,out:5,output:5,over:[2,3,6],overflow:[6,9],packag:5,parallel:3,param:[],paramet:[5,9],particl:6,partli:6,pass:[3,5,9],path:5,per:6,perform:[],perhap:[],persist:3,phase:9,physic:6,pick:5,pickabl:9,pickl:[2,3,6],platform:5,plot:6,point:9,poisson:[6,7,9],polar_axi:9,popular:4,portabl:6,pose:4,possibl:[3,6],potenti:[],power:[],precis:6,prefer:9,previou:9,principl:[],print:5,priori:6,problem:[5,6,8,9],project:[2,4],propag:[7,9],proper:5,properi:[],properti:5,provid:[3,5,6],python:[],quantiti:3,queri:5,quickli:6,random:3,rang:9,rational:[],real:[6,8,9],reason:9,reduc:6,regular_axi:[3,9],releas:[],repres:3,represent:6,requir:5,respect:[5,6],result:3,right:[5,9],root:[4,6,7],run:[5,6,9],run_fil:3,runtim:9,safe:3,same:[3,4,6,9],scheme:9,second:[6,9],see:2,self:9,separ:9,sequenc:[6,9],serial:[],serv:6,set:[3,4,6],setter:5,sever:[3,4,6,9],shape:9,should:[4,6],shouldn:[4,6],side:[5,6,9],signatur:[3,9],simpl:3,simul:6,sinc:[5,6,9],singl:[3,5,9],size:[6,9],smallest:6,softwar:2,solv:8,some:5,sort:6,space:[3,9],speed:[2,9],sphinx:5,spread:6,squar:6,standard:[6,9],start:[6,9],static_vector:[],statist:3,std:[6,9],storag:[3,4,6,9],store:[6,9],strategi:[],stream:2,strictli:5,string:[6,9],structur:[],studi:6,style:[],subject:6,submit:2,sum:[3,6,9],suppli:9,support:[],suppress:[],sure:6,sutter:4,system:6,templat:9,test:[],text_oarch:6,than:4,thei:[3,4,5,6,9],theori:[6,9],thi:[2,3,4,5,6,9],thin:4,thing:[3,4,5,6],those:4,thrown:9,time:[5,9],too:3,tool:3,track:9,transpar:[],tupl:9,turn:[5,6],tutori:[],two:[4,6,9],txt:[],type:[],typedef:9,typenam:9,typic:6,uncertainti:[7,9],under:[2,6],underflow:[6,9],unfortun:6,unsign:9,until:9,unweight:[6,9],uoflow:9,usabl:6,user:[3,4,6],valu:[6,9],value_c:9,vari:[6,9],variabl:[3,6,9],variable_axi:9,varianc:[],variance_c:9,variant:9,vector:[6,9],veri:5,version:[2,9],view:3,visitor:5,void_:[],wai:[5,6],weight:[],well:6,wfill:[5,9],wfill_c:9,what:[],whatev:6,when:[5,6],where:[5,9],whether:9,which:[3,4,5,6,9],who:3,why:9,wide:[4,9],width:[6,9],wish:4,without:[2,3,4],work:[3,4,6],worri:3,would:[5,6],wrap:[5,9],write:4,written:[3,6],www:[],yet:5,yield:9,you:[3,4],zen:6,zero:[]},titles:["CHANGELOG","Functions","Histogram","Introduction","Motivation","Notes","Rationale","References","Tutorial","Types"],titleterms:{"class":[],"function":1,axi:9,bin:6,build:5,cach:[],changelog:0,check:5,congruenc:[],consist:5,content:2,conveni:6,count:6,depend:5,descript:2,design:6,effici:6,estim:6,friendli:[],histogram:[2,9],how:5,instal:5,interfac:[5,6,9],introduct:3,languag:6,memori:6,motiv:4,note:5,perform:6,power:6,principl:6,python:[5,9],rational:6,refer:7,serial:6,strategi:6,support:[],suppress:6,test:5,transpar:6,tutori:8,type:9,varianc:6,weight:6,zero:6}}) \ No newline at end of file diff --git a/doc/html/types.html b/doc/html/types.html index d972a0a4..c375be81 100644 --- a/doc/html/types.html +++ b/doc/html/types.html @@ -42,8 +42,8 @@

    Types

    The library consists of a single histogram and several axis types which are stored in a boost::variant called axis_type. The axis types are created and passed to the constructor of the histogram to define its binning scheme. All following types are embedded in the boost::histogram namespace, which is omitted for brevity.

    -
    -

    The Histogram Class

    +
    +

    Histogram type

    #include <boost/histogram/histogram.hpp>

    C++ interface

    @@ -152,7 +152,7 @@
    unsigned shape(unsigned i) const
    -

    Returns the actual number of fields used by the axis. If the axis has underflow and overflow bins disabled, this is equal to bins(). Otherwise, the number is larger by 2.

    +

    Returns the actual number of fields used by the axis. If the axis has no underflow and overflow bins, this is equal to bins(). Otherwise, the number is larger by 2.

    @@ -183,7 +183,7 @@ template<typename T>
    __init__(*axes)
    -

    Pass one or more axis objects to define the dimensions of the histogram.

    +

    Pass one or more axis objects as arguments to define the dimensions of the histogram.

    @@ -234,7 +234,7 @@ template<typename T>
    fill(*values, w=None)

    Pass a sequence of values with a length n is equal to the dimensions of the histogram, and optionally a weight w for this fill (int or float).

    -

    If Numpy support is enabled, values my also be a 2d-array of shape (m, n), where m is the number of tuples, and optionally another a second 1d-array w of shape (n,).

    +

    If Numpy support is enabled, values my also be a 2d-array of shape (m, n), where m is the number of tuples to pass at once, and optionally another a second 1d-array w of shape (m,).

    @@ -484,7 +484,7 @@ template<typename T>
  • Tutorial
  • Notes
  • Types
  • diff --git a/doc/sphinx/motivation.rst b/doc/sphinx/motivation.rst index df2a7d5d..d7db53f8 100644 --- a/doc/sphinx/motivation.rst +++ b/doc/sphinx/motivation.rst @@ -4,3 +4,5 @@ Motivation There is a lack of a widely-used, free histogram class. While it is easy to write an 1-dimensional histogram, writing an n-dimensional histogram poses more of a challenge. If you add serialization and Python/Numpy support onto the wish-list, the air becomes thin. The main competitor is the `ROOT framework `_. The histogram in this project is designed to be more convenient to use, and as fast or faster than the equivalent ROOT histograms. It comes without heavy baggage, instead it has a clean and modern C++ design which follows the advice given in popular C++ books, like those of `Meyers `_ and `Sutter and Alexandrescu `_. + +Two of the main design goals are to conveniently hide the internal details on how things are counted, and to use the same interface for 1-dimensional and n-dimensional histograms. The count storage is an implementation detail, chosen automatically to be fast and efficient. The histogram should *just work*, users shouldn't be forced to make choices among several storage options everytime they encounter a new data set. diff --git a/doc/sphinx/notes.rst b/doc/sphinx/notes.rst index 08282d17..18b29d18 100644 --- a/doc/sphinx/notes.rst +++ b/doc/sphinx/notes.rst @@ -45,7 +45,7 @@ Properties Getter/setter-like functions are wrapped as properties. Keyword-based parameters - C++ member functions :cpp:func:`histogram::fill` and :cpp:func:`histogram::wfill` are wrapped by the single Python member function :py:func:`histogram.fill` + C++ member functions :cpp:func:`histogram::fill` and :cpp:func:`histogram::wfill` are wrapped by the single Python member function :py:func:`histogram.fill` with an optional keyword parameter :py:obj:`w` to pass a weight. C++ convenience C++ member function :cpp:func:`histogram::bins` is omitted on the Python side, since it is very easy to just query this directly from the axis object in Python. On the C++ side, this would require a extra type cast or applying a visitor. diff --git a/doc/sphinx/types.rst b/doc/sphinx/types.rst index 59930291..dac892b9 100644 --- a/doc/sphinx/types.rst +++ b/doc/sphinx/types.rst @@ -3,8 +3,8 @@ Types The library consists of a single :cpp:class:`histogram` and several axis types which are stored in a ``boost::variant`` called :cpp:type:`axis_type`. The axis types are created and passed to the constructor of the histogram to define its binning scheme. All following types are embedded in the ``boost::histogram`` namespace, which is omitted for brevity. -The Histogram Class -------------------- +Histogram type +-------------- ``#include `` @@ -93,7 +93,7 @@ C++ interface .. cpp:function:: unsigned shape(unsigned i) const - Returns the actual number of fields used by the axis. If the axis has underflow and overflow bins disabled, this is equal to :cpp:func:`bins`. Otherwise, the number is larger by 2. + Returns the actual number of fields used by the axis. If the axis has no underflow and overflow bins, this is equal to :cpp:func:`bins`. Otherwise, the number is larger by 2. .. cpp:function:: template T& axis(unsigned i) @@ -112,7 +112,7 @@ Python interface .. py:method:: __init__(*axes) - Pass one or more axis objects to define the dimensions of the histogram. + Pass one or more axis objects as arguments to define the dimensions of the histogram. .. autoattribute:: dim @@ -124,12 +124,12 @@ Python interface Pass a sequence of values with a length ``n`` is equal to the dimensions of the histogram, and optionally a weight :py:obj:`w` for this fill (*int* or *float*). - If Numpy support is enabled, values my also be a 2d-array of shape (``m``, ``n``), where ``m`` is the number of tuples, and optionally another a second 1d-array :py:obj:`w` of shape (``n``,). + If Numpy support is enabled, :py:obj:`values` my also be a 2d-array of shape ``(m, n)``, where ``m`` is the number of tuples to pass at once, and optionally another a second 1d-array :py:obj:`w` of shape ``(m,)``. .. py:method:: value(*indices) :param int indices: indices of the bin - :return: value for the bin + :return: count for the bin .. py:method:: variance(*indices)