Details of some of the version changes that didn't get into
the svn log files.

209 adabney  first step toward using a subset of densities in the
             denominator.  Change from odpScore to odp.

210 adabney  "Turn off unit tests"  scripts/run_unit_tests

211 adabney  "fixed two bugs in edge.c" edge.c
             change from using muB to xk

212 adabney  "fixed bug in OdpThread.h" odpThread.h
             change m_Res to m_pRes

213 adabney  "debugging" odpThread.cpp
             move line endings, this shouldn't change the compiled code!


214 adabney "debugging" RInterfaces.cpp
             change xk to xxk, pxXK to pxXXK

215 jstorey "I updated odp.r to implement the new boostrap and 
            gene subset selection code.  I have commented out 
            the gene subset selection code for now (to see if 
            it works as is) and let edge choose all genes to use 
            in the denominator. If it works, we can uncomment 
            the gene subset selection code."

            odp.r: change permutation (B0) calculation
            nii <- 1:m (for now)
            define use.genes function, but still unused.

216 adabney "more minor changes to bootstrap and subset selection 
            code implemented" 
            odp.r: mu %*% t(ID), add muBS, sigmaBS to datalist,
                decrement nii at the appropriate point
            edge.c:  nii are local instead of dummy in nullODP, 
                   remove m from arglist, move m0
            RInterfaces.cpp: add muBS and sigmaBS
            edge.h: change nullODP prototype
            RInterfaces.h: RunODP prototype
            OdpThread.cpp: add m_pMuBS, m_pSigmaBS

217 adabney "debug"
            edge.h: add to the odp() prototype
            edge.c: nii from vector to ivector
            OdpThread.cpp: change max calculation

218 adabney "debugging"
            edge.h: add callbacks to nullODP
            edge.c: add callbacks to nullODP
            OdpThread.cpp: change max calculation

219 adabney "debugging"
            extract B and m0 from datalist.
            m and n from xx and ID instead of from dat.

220 adabney "debuggin"
            m <- length(xx) instead of nrow(xx)

221 adabney "debugging"  edge.c:
            So many changes that svn diff gives up and prints the whole thing.

222 adabney "debuggin" 
            edge.c: nii from long* to int*, loop from i to ii
            (but ivector is long*, not int*!!!)

223 adabney "debugging"
            edge.h: add intvector, free_intvector

224 adabney "debugging"
            edge.c: intvector from long* to int*

225 jtleek  "Fixed a bug that caused null statistics to be inflated 
            over loops. "
            edge.c: change i to j in xk[] subscript
            That is, it was summing over the wrong index.

226 jtleek  "We have made changes to fix the bootstrap null distribution. 
            This version allows bootstrap and subset selection, 
            however right now the function is set to always use all 
            densities in the denominator (i.e. no subset selection)."

            edge.c: add sigma0 to nullOdp, and one call to odp()
                    lots of text reformatting, including blank spaces.
            RInterfaces.h: too many changes for diff
            OdpThread.cpp: too many changes for diff
            OdpThread.h: too many changes for diff

227 gah4    "Add

            options(expressions=100000)

            added to avoid stack problems due to recursion in heatmap."

            It seems that this is a well known problem, that heatmap
            uses a highly recursive algorithm and the default is
            set not to allow that.

228 gah4    "Change '\r' to '\n' line terminators."
            cluster/CongaLine.h

229 gah4    "Comment out "Your computer is not frozen" message in odpui.r."

230 gah4    "Print more timing information if debugOn is true.
            Otherwise, it should not change anything."

            Reduce expressions back to 1000 after heatmap, though
            the recursive bug was in C++ code not R code.
            if(debugOn) print clustering start and stop time.

231 gah4    "Mostly changes to pass a list, datalist, to RunODP and then to
            the COdpThread constructor instead of passing all the variables
            separately.  This will make it much easier to add variables later.

            Note that elements are currently extracted by the position in 
            the list, so changes should be made with that in mind.  
            Also, no type conversion is done on extraction, so INTEGER values 
            should have as.integer applied before being added to the list.

            To make checking and debugging easier, with the debug option to 
            edge() the random number generator is seeded with a constant seed.

            Much of the old code is still in but commented out.  I will 
            probably remove it soon.  Also, some debugging code is 
            commented out, much of it conditional on the debug flag, anyway."

            Saves allocating many temporary variables, and PROTECTing
            them.  Just pass the list directly to OdpThread.h

232 gah4    "Correct some comments, and rearrange some long lines so 
            that they are more readable.  There should be no changes 
            to any executable code."

233 gah4    "Fixup the percentage done calculation so that all arithmetic 
            is done with (double) to avoid overflow problems.  
            This was supposed to have been done in 116, but for enough 
            genes it would have still overflowed.  Otherwise, I 
            think the counts are right, though they weren't in 208.

            Messages like:

            warning: pet >1.  current=xxxxxxxx max   = yyyyyyyyy 
            come when the max calculation is wrong, such that it 
            doesn't agree with current."

234 gah4    "Added $Revision$ keywork in initial comments, and svn 
            propset svn:keywords Revision edge.c to activate it."
            edge.c:

235 gah4    "Exchange i and j loops for odp, which speeds it up by about
            a factor of 1.6 or so.  Maybe more, that is just for the scr[]
            evaluation for the numerator.

            After exchanging the loops, many j independent terms can be
            moved out.  Also, there is no need for temporary vectors,
            now or before.  They were for variables that were only
            used inside the loop, so scalar variables work fine.

            Next, try not to do exp() when the argument is very small."

236 gah4    "Add $Revision$ keyword to the file name comment at the
            beginning of each file.  This is especially convenient with
            printed listings to remember which version they apply to.

            With keyword substitution active, svn will add the current
            revision number to all working copies."
            RInterfaces.cpp
            TimecourseThread.cpp
            OdpThread.cpp
            MathUtility.cpp
            Rintf_cluster.cpp
            TimecourseNoIntercept.cpp
            Rintf_threads.cpp
            TimecourseIntercept.cpp

            I probably should have done them all at once, but
            this is a good start.

237 gah4    "Add $Revision$ keyword to some files.
            Rewrap some long lines in function declarations.
            Remove commented out old code from previous changes."
            TimecourseNoIntercept.h
            Rintf_threads.h
            TimecourseIntercept.h
            edge.h
            Rintf_cluster.h
            MsgIds.h
            debug.h
            
238 gah4    "Exchange *m and *m0 for denominator loops.
            I previously changed the loops but not *m and *m0."

            It worked when *m and *m0 were equal, but...

239 gah4    "Just like CongaLine.h, convert '\r' to '\n', that is,
            unix style line terminators."
            CongaLine.cpp: I suppose I should have noticed earlier.

240 gah4    

241 gah4

242 gah4    "Remove '\r' such that line termination is consistently
            unix style '\n'."
            I believe that unlike the CongaLine routines these
            had both '\r' and '\n', so it wasn't so obvious.
            This way we are consistent, though it might be that
            debugging should be done on unix based systems.
            cluster/ClusterNode.cpp: add fprintf statements
            I am supposed to be doing diff -b, but it seems
            that differences in white space still show up.

243 gah4    "m_pResult was not initialized, when it should be 
            initialized to NULL.

            When it is not initialized, RecursiveDelete finds a 
            long chain of pointers, with a loop about 19195 long, 
            to try to delete.

            Thre result is probably a memory leak, and probably 
            m_ppNodes can and should be used to delete the 
            CClusterNode* elements.

            A memory leak is better than crashing, especially since one 
            won't do so many clustering operations in a single session."
            cluster/ClusterThread.cpp:

244 gah4    "Make sure all instance variables are initialized, 
            NULL for pointers, zero for numeric variables."
            cluster/Cluster.cpp
            cluster/ClusterNode.cpp
            cluster/EisenOrdering.cpp

245 gah4    "Correct wrong spelling for variable name in previous change."
            cluster/OptimalOrdering.cpp: m_iNodeCost to m_iNodeCount

246 gah4    "Add *nii argument to NullODP() in OdpThread.cpp, 
            and edge.c, and prototype in edge.h."
            OdpThread.cpp: 

            This may not have been needed.  This was from when
            we thought that the problem was subset selection not
            being done, but instead it was subset selection being
            done when it wasn't supposed to be.

247 gah4    "Hopefully restore back to r169 without rdtsc.o"

            Makefile: rdtsc.o, the assembled version of rdtsc.s which 
            runs only on x86 processors, is loaded using a modified 
            Makefile.  I accidentally checked in the modified version.
            It seems that it doesn't run if renamed, either!

            The change adds rdtsc.o to SOURCES, even though it isn't.

248 gah4    "Print out some of lr and lr0 if the debug flag is TRUE."

            uncomment nii <- use.genes(dat=dat, y=grp)
            m0 <- length(nii)  (true even with 1:m)
            if any lr or lr0 are non-finite, print out lr or lr0.
            if(debugOn) print the first 100 lr and lr0, and
            histogram of log(lr0)
            print(m0/m)

249 gah4    "Change OdpThread.cpp, edge.c, edge.h back to the way
            they were in version 242.  This was done by doing:

            mkdir temp
            cp OdpThread.cpp edge.c edge.h temp
            svn update .
            cp temp/* .
            svn commit .

            There might be a better way, but this is so far what worked."

            The changes added *nii as an argument to nullOdp, but
            that wasn't needed.  The also restore generating an identity
            vector nii[], which I believe also isn't needed by now.

250 gah4    "Remove previously commented out code from before passing
            a list to odp.  Remove commented out and unused debugging code."

            Remove the old .Call("RunODP", ...) only commented out before.
            Fix printing of lr[1:100] and lr0[1:100]

251 gah4    "They now give the right answer, matching brca.r, 
            but still need some cleanup.  They do compile and run, 
            so I wanted to check them in."

            The changes at this point include splitting odp() up
            into odp1() through odp4(), each optimized for its
            specific use.

            That is, odp1() for the alternative numerator, 
            odp2() for the alternative denominator, odp3() for
            the null numerator, and odp4() for the null denominator.

            The original odp() had two completely separate sections
            of code for the numerator and denominator, with the only 
            common statement for the timing callback function.  

            Separating the alternative and null allows making separate
            changes to each, mostly that ones uses nii[] and the other
            does not.  

            There is no need for middle[] and last[] vectors, since
            the value are only used within the same loop iteration.

            More timing code added to odp1() for finer timing.

            nullOdp: call odp3() and odp4().

252 gah4    "Check in so I can change some things and not worry about
            getting back again."

            edge.c: Change m and m0 to mi and mj, as previously in one
            case m0 was the dummy for m, and m the dummy for m0.
            Move max calculation to odp1t() through odp4t(), so that
            it is only in one place, and close to the odp?() routines.

253 gah4    "Small changes to the time/progress bar calculation.
            Some changes were made to agree with the change from m0 to m,
            others to make the progress calculation more accurate."

            Previously only the quadratic (mi*mj) term was used for
            the timing (progress bar).  With more accurate timing 
            information, I now add the linear (mi and mj) terms,
            and a constant term.  

            Add more rdtsc() calculation to odp1().

254 gah4    "Change one statement such that it is within 
            #ifdef EDGE_DEBUG that was supposed to be that way.  
            All rdtsc() timing calculations should be, as rdtsc() 
            is not available on all machines."

            It should be that all debugging printf() are only
            active when EDGE_DEBUG is defined, which comes from the
            "make debug" section of the Makefile.  Also, all rdtsc()
            calls should also be done only with EDGE_DEBUG.

            Maybe someday I will write a PPC version of rdtsc.s

255 gah4    "This version uses a lookup table instead of exp.  
            The results are slightly different, but probably reasonable.

            I am hiding it here, to go back and work 
            on the previous edge.c"

            edge.tab.c: A lookup table is somewhat faster than exp(), 
            though not exact.  As I am not testing it any more, 
            it is stored here in case I want to look at it later.

            That is, the changes are in edge.tab.c, not edge.c.

256 gah4    "Use a temporary variable for exp().  This makes it a
            little easier to change to other functions besides exp."

            That is, xt is computed and used as the argument to exp.
            This isn't quite a kernel, as xt is -0.5*x**2.

257 gah4    "Implement the Epanechnikov kernel, which is much 
            faster than the Gaussian kernel, and is supposed 
            to be better, anyway.

            We don't need differentiability.

            Update the timing calculation for the new kernel."

            Epanechnikov is an upside down parabola, much faster
            to compute.  Still, I will soon go back to Gaussian.

258 gah4    "Move the coefficient out of the loop, and update timing.

            It is between 6 and 10 times faster than exp(), and about
            twice as fast as the lookup table for exp()."

            The coefficient in front of epanechnikov was being multiplied
            each time, instead of only once, outside the loop.
            Though we probably don't need it anyway.

259 gah4    "Back to gaussian kernel.

            Using preprocessor symbols, it should be easy to change the
            kernel around to try out different ones.  The Epanechnikov
            kernel is still there as an unreferenced proprocessor symbol.

            Change ENOUGH to 200000, which should be plenty low enough."

            ENOUGH is used to tell how often the status bar and % should
            be updated.  2000 is way too small.  Even 200000 is pretty
            small.  

260 gah4    "Rename debug() to edge.debug() so that the built-in
            R debug() function can be used."

            debug() is a very useful built-in R function!

261 gah4    "rename match <<-  to edge.match
            remove ,NULL from new.env()
            change tkcmd to tcl, as per error message"

            It seems that the global variable match isn't used,
            but I didn't remove the assignment, only changed the name.
            new.env() doesn't like the ,NULL so I removed it.
            tkcmd() message says to change to tcl() so I did.

262 gah4    "list doesn't add NULL elements when a list element assignment
            is done.  Three that are needed for background=TRUE were
            not getting assigned when background=FALSE.

            As list extraction is by position, and the length of the
            list is verified, this needed to be changed.

            For now, store 0 for appropriate list elements
            instead of NULL.  This should work, as they
            are not referenced.  Otherwise, see about alist()"

            This is needed when some are null, as they are extracted
            by position.  Fix printing of datalist if debugOn is 2 or 3.

263 gah4    "Makefile.rdtsc is like Makefile, but with rdtsc.o 
            added to SOURCES (even though it isn't a source file).

            I believe this needs to be renamed to Makefile before 
            it will work.  make -f Makefile.rdtsc doesn't work."

            Now I can svn commit . without losing this makefile.

264 gah4    "odp.r using list assignment, as I learned from 
            r-help@r-project.org.  It looks a little nicer!"

            listname["list element"] <- list(NULL)
            or list(null.variable) will work, others won't.










