[julia-users] Re: How do I maximize a function ?

2016-11-18 Thread John Myles White
Pkg.add("Optim") then using Optim and follow this section of the docs: http://www.juliaopt.org/Optim.jl/stable/user/minimization/#minimizing-a-univariate-function --John On Friday, November 18, 2016 at 7:29:28 PM UTC-8, Pranav Bhat wrote: > > How do I obtain the maximum value of a functio

[julia-users] How do I maximize a function ?

2016-11-18 Thread Pranav Bhat
How do I obtain the maximum value of a function over an interval? In R I would do something like: f <- function(x) { x ^ 2} optimize(f, c(0, 100), maximum=TRUE)

Re: [julia-users] How to enter a file using gallium?

2016-11-18 Thread Michele Zaffalon
You @enter the function, not the file. What function would you call once you include test.jl? That is the function to which you should prepend @enter. On Fri, Nov 18, 2016 at 6:49 PM, wrote: > > > Hi there, > > I'm totally new to the new debuggers. What I'm aiming at is to go through > a file (i

[julia-users] Is the compiler able to give warnings that an iterator's internal state modified?

2016-11-18 Thread FANG Colin
I guess the following is buggy code dict = Dict(x=>x for x in 1:100); for x in keys(dict) delete!(dict, x) end As we need to `collect(keys(...))` to make a copy. However the code above still runs with correct results. Even when it fails to return correct results, no erro

[julia-users] Project organization and variable scope question

2016-11-18 Thread Nicholas Mueschke
To start, I'm new to Julia and I'm trying things out to test Julia out for some scientific/engineering applications. In particular, I'm working on moderate size projects, where they're big enough that I'll need more than one file with code in it to stay organized (let's say anywhere from 5-50

Re: [julia-users] Got an exception of type ErrorException outside of a @test: type DataType has no field FactorMargin

2016-11-18 Thread Kevin Liu
Have a look please https://github.com/hpoit/MLN.jl/tree/master/BN On Friday, November 18, 2016 at 11:48:58 AM UTC-2, Yichao Yu wrote: > > On Thu, Nov 17, 2016 at 2:39 PM, Kevin Liu > > wrote: > > Right, I need the instance of Factor > > Then use the instance of Factor. > > > > > On Thursday,

[julia-users] How to enter a file using gallium?

2016-11-18 Thread chobbes158
Hi there, I'm totally new to the new debuggers. What I'm aiming at is to go through a file (it's a file calling other packages and functions therein.) line by line, just like in matlab. The first step is to step in the file using gallium. I know how to traverse a function in terminal using Ga

Re: [julia-users] Got an exception of type ErrorException outside of a @test: type DataType has no field FactorMargin

2016-11-18 Thread Yichao Yu
On Thu, Nov 17, 2016 at 2:39 PM, Kevin Liu wrote: > Right, I need the instance of Factor Then use the instance of Factor. > > On Thursday, November 17, 2016 at 5:33:05 PM UTC-2, Yichao Yu wrote: >> >> On Thu, Nov 17, 2016 at 2:27 PM, Kevin Liu wrote: >> > I replaced Factor[:FactorMargin]() with