|
From: Pecevski D. <de...@ig...> - 2009-03-16 08:12:43
|
Hi,
Mathieu Dubois wrote:
> However, I would like to create a member function double
> getLinearInput(void) that returns the value of the member "linear_input"
> (in the same vein as getAnalogOutput()). How do I have to declare it?
>
> I have tried the following declaration double getLinearInput(void) {
> return this->linear_input;}; (see attachments) but when I try to use it
> I get the following error:
>
> ArgumentError: Python argument types in
>
> SquashingNeuron.getLinearInput(SquashingNeuron)
>
> did not match C++ signature:
>
> getLinearInput(SquashingNeuron {lvalue})
>
>
> I have seen that AnalogPointNeuron::getAnalogOutput is declared as follows:
>
> virtual double <http://www.lsm.tugraz.at/pcsim/cppclassreference/html/classdouble.html> getAnalogOutput <http://www.lsm.tugraz.at/pcsim/cppclassreference/html/classAnalogPointNeuron.html#a6e02306ef9cd057f844615691b9293f> (analog_port_id_t <http://www.lsm.tugraz.at/pcsim/cppclassreference/html/globaldefinitions_8h.html#40dfc683bdf73c81c9c73726fc834feb> port=0) const
>
How do you invoke the getLinearInput function from Python?
You can try the virtual keyword, but I'm not sure that causes the problem.
rgds,
Dejan
>
> Is it necessary to declare the function virtual (I'm not a C++ expert :) ?
>
> Thank you again & sorry for the trouble,
> Mathieu
>
>
>
> ------------------------------------------------------------------------------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> _______________________________________________
> Pcsim-users mailing list
> Pcs...@li...
> https://lists.sourceforge.net/lists/listinfo/pcsim-users
>
--
_______________________________________________
Dejan Pecevski
Institute for Theoretical Computer Science
Graz University of Technology
Inffeldgasse 16b, A-8010 Graz, Austria
Tel. +43 316 873 5849
|