AI-LibNeural
view release on metacpan or search on metacpan
LibNeural.xs view on Meta::CPAN
/*
* $Header$
*
* this is based off of code that i based off of other modules i've found in the
* distant past. if you are the original author and you recognize this code let
* me know and you'll be credited
*
* Copyright (C) 2003 by Ross McFarland
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307 USA.
*
*/
#ifdef __cplusplus
extern "C" {
#endif
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#ifdef __cplusplus
}
#endif
#include <nnwork.h>
#include <neuron.h>
static int
not_here(char *s)
{
croak("%s not implemented on this architecture", s);
return -1;
}
static double
constant(char *name, int len, int arg)
{
errno = 0;
switch (name[0 + 0]) {
case 'A':
if (strEQ(name + 0, "ALL")) { /* removed */
#ifdef ALL
return ALL;
#else
goto not_there;
#endif
}
case 'H':
if (strEQ(name + 0, "HIDDEN")) { /* removed */
#ifdef HIDDEN
return HIDDEN;
#else
goto not_there;
#endif
( run in 0.811 second using v1.01-cache-2.11-cpan-39bf76dae61 )