Merge branch 'master' of ../yap-6.2
This commit is contained in:
commit
26c265ba13
23
C/iopreds.c
23
C/iopreds.c
@ -5955,10 +5955,9 @@ p_format(void)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static Int
|
static Int
|
||||||
p_format2(void)
|
format2(UInt stream_flag)
|
||||||
{ /* 'format'(Stream,Control,Args) */
|
{
|
||||||
int old_c_stream = Yap_c_output_stream;
|
int old_c_stream = Yap_c_output_stream;
|
||||||
int mem_stream = FALSE, codes_stream = FALSE;
|
int mem_stream = FALSE, codes_stream = FALSE;
|
||||||
Int out;
|
Int out;
|
||||||
@ -5977,7 +5976,7 @@ p_format2(void)
|
|||||||
mem_stream = TRUE;
|
mem_stream = TRUE;
|
||||||
} else {
|
} else {
|
||||||
/* needs to change Yap_c_output_stream for write */
|
/* needs to change Yap_c_output_stream for write */
|
||||||
Yap_c_output_stream = CheckStream (ARG1, Output_Stream_f, "format/3");
|
Yap_c_output_stream = CheckStream (ARG1, Output_Stream_f|stream_flag, "format/3");
|
||||||
}
|
}
|
||||||
UNLOCK(Stream[Yap_c_output_stream].streamlock);
|
UNLOCK(Stream[Yap_c_output_stream].streamlock);
|
||||||
if (Yap_c_output_stream == -1) {
|
if (Yap_c_output_stream == -1) {
|
||||||
@ -6009,6 +6008,18 @@ p_format2(void)
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Int
|
||||||
|
p_format2(void)
|
||||||
|
{ /* 'format'(Stream,Control,Args) */
|
||||||
|
return format2(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Int
|
||||||
|
p_swi_format(void)
|
||||||
|
{ /* 'format'(Stream,Control,Args) */
|
||||||
|
return format2(SWI_Stream_f);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static Int
|
static Int
|
||||||
p_skip (void)
|
p_skip (void)
|
||||||
@ -6806,6 +6817,10 @@ Yap_InitIOPreds(void)
|
|||||||
Yap_InitCPred ("$tolower", 2, p_tolower, SafePredFlag|HiddenPredFlag);
|
Yap_InitCPred ("$tolower", 2, p_tolower, SafePredFlag|HiddenPredFlag);
|
||||||
Yap_InitCPred ("file_base_name", 2, p_file_base_name, SafePredFlag|HiddenPredFlag);
|
Yap_InitCPred ("file_base_name", 2, p_file_base_name, SafePredFlag|HiddenPredFlag);
|
||||||
|
|
||||||
|
CurrentModule = SYSTEM_MODULE;
|
||||||
|
Yap_InitCPred ("swi_format", 3, p_swi_format, SyncPredFlag);
|
||||||
|
CurrentModule = cm;
|
||||||
|
|
||||||
Yap_InitReadUtil ();
|
Yap_InitReadUtil ();
|
||||||
#if USE_SOCKET
|
#if USE_SOCKET
|
||||||
Yap_InitSockets ();
|
Yap_InitSockets ();
|
||||||
|
@ -242,6 +242,10 @@ goal_expansion(print(A),write_term(user_output,A,[swi(true),portray(true),number
|
|||||||
goal_expansion(print(S,A),write_term(S,A,[swi(true),portray(true),numbervars(true)])) :- swi_io.
|
goal_expansion(print(S,A),write_term(S,A,[swi(true),portray(true),numbervars(true)])) :- swi_io.
|
||||||
goal_expansion(write_term(A,Opts),write_term(user_output,A,Opts,[swi(true)|Opts])) :- swi_io.
|
goal_expansion(write_term(A,Opts),write_term(user_output,A,Opts,[swi(true)|Opts])) :- swi_io.
|
||||||
goal_expansion(write_term(S,A,Opts),write_term(S,A,[swi(true)|Opts])) :- swi_io, \+ member(swi(_), Opts).
|
goal_expansion(write_term(S,A,Opts),write_term(S,A,[swi(true)|Opts])) :- swi_io, \+ member(swi(_), Opts).
|
||||||
|
goal_expansion(format(A),system:swi_format(user_output,A,[])) :- swi_io.
|
||||||
|
goal_expansion(format(A,Args),system:swi_format(user_output,A,Args)) :- swi_io.
|
||||||
|
goal_expansion(format(S,A,Args),system:swi_format(S,A,Args)) :- swi_io.
|
||||||
|
goal_expansion(writeln(A),system:swi_format(user_output,'~w~n',[A])) :- swi_io.
|
||||||
|
|
||||||
|
|
||||||
% make sure we also use
|
% make sure we also use
|
||||||
|
@ -203,7 +203,7 @@ TrData trie_traverse_init(TrEntry trie, TrData init_data) {
|
|||||||
if (CURRENT_TRAVERSE_MODE == TRAVERSE_MODE_FORWARD)
|
if (CURRENT_TRAVERSE_MODE == TRAVERSE_MODE_FORWARD)
|
||||||
data = TrEntry_first_data(trie);
|
data = TrEntry_first_data(trie);
|
||||||
else
|
else
|
||||||
data = TrEntry_last_data(trie);
|
data = trie_get_last_entry(trie);
|
||||||
}
|
}
|
||||||
TrEntry_traverse_data(trie) = data;
|
TrEntry_traverse_data(trie) = data;
|
||||||
return data;
|
return data;
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
* *
|
* *
|
||||||
* Author: Bernd Gutmann *
|
* Author: Bernd Gutmann *
|
||||||
* File: problogmath.c *
|
* File: problogmath.c *
|
||||||
* $Date:: 2010-10-06 13:20:59 +0200 (Wed, 06 Oct 2010) $ *
|
* $Date:: 2010-12-17 12:21:58 +0100 (Fri, 17 Dec 2010) $ *
|
||||||
* $Revision:: 4880 $ *
|
* $Revision:: 5159 $ *
|
||||||
* *
|
* *
|
||||||
********************************************************************************
|
********************************************************************************
|
||||||
* *
|
* *
|
||||||
@ -187,7 +187,7 @@
|
|||||||
\******************************************************************************/
|
\******************************************************************************/
|
||||||
|
|
||||||
#include "problogmath.h"
|
#include "problogmath.h"
|
||||||
|
#include "general.h"
|
||||||
|
|
||||||
double sigmoid(double x, double slope) {
|
double sigmoid(double x, double slope) {
|
||||||
return 1.0 / (1.0 + exp(-x * slope));
|
return 1.0 / (1.0 + exp(-x * slope));
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
* *
|
* *
|
||||||
* Author: Bernd Gutmann *
|
* Author: Bernd Gutmann *
|
||||||
* File: problogmath.h *
|
* File: problogmath.h *
|
||||||
* $Date:: 2010-10-06 13:20:59 +0200 (Wed, 06 Oct 2010) $ *
|
* $Date:: 2010-12-17 12:21:58 +0100 (Fri, 17 Dec 2010) $ *
|
||||||
* $Revision:: 4880 $ *
|
* $Revision:: 5159 $ *
|
||||||
* *
|
* *
|
||||||
********************************************************************************
|
********************************************************************************
|
||||||
* *
|
* *
|
||||||
@ -212,4 +212,6 @@ double cumulative_normal_upper(double high, double mu, double sigma);
|
|||||||
double cumulative_normal_upper_dsigma(double high,double mu,double sigma);
|
double cumulative_normal_upper_dsigma(double high,double mu,double sigma);
|
||||||
double cumulative_normal_upper_dmu(double high,double mu,double sigma);
|
double cumulative_normal_upper_dmu(double high,double mu,double sigma);
|
||||||
|
|
||||||
|
double normal(double x, double mu,double sigma);
|
||||||
|
|
||||||
density_integral parse_density_integral_string(char *input, char *variablename);
|
density_integral parse_density_integral_string(char *input, char *variablename);
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
* *
|
* *
|
||||||
* Author: Theofrastos Mantadelis *
|
* Author: Theofrastos Mantadelis *
|
||||||
* File: simplecudd.c *
|
* File: simplecudd.c *
|
||||||
* $Date:: 2010-10-06 13:20:59 +0200 (Wed, 06 Oct 2010) $ *
|
* $Date:: 2010-12-17 12:21:58 +0100 (Fri, 17 Dec 2010) $ *
|
||||||
* $Revision:: 4880 $ *
|
* $Revision:: 5159 $ *
|
||||||
* *
|
* *
|
||||||
********************************************************************************
|
********************************************************************************
|
||||||
* *
|
* *
|
||||||
@ -1688,7 +1688,7 @@ int GetParam(char *inputline, int iParam) {
|
|||||||
|
|
||||||
void onlinetraverse(DdManager *manager, namedvars varmap, hisqueue *HisQueue, DdNode *bdd) {
|
void onlinetraverse(DdManager *manager, namedvars varmap, hisqueue *HisQueue, DdNode *bdd) {
|
||||||
char buf, *inputline;
|
char buf, *inputline;
|
||||||
int icur, maxlinesize, iline, index, iloop, iQsize, i, inQ, iRoot; //ivalue,
|
int icur, maxlinesize, iline, index, iloop, iQsize, i, iRoot; //ivalue,inQ,
|
||||||
// double dvalue;
|
// double dvalue;
|
||||||
DdNode **Q, **Q2, *h_node, *l_node, *curnode;
|
DdNode **Q, **Q2, *h_node, *l_node, *curnode;
|
||||||
hisqueue *his;
|
hisqueue *his;
|
||||||
|
Reference in New Issue
Block a user