Merge branch 'master' of yap.dcc.fc.up.pt:yap-6

This commit is contained in:
Vitor Santos Costa 2011-02-05 10:28:11 +00:00
commit 4ff537a9ed
2 changed files with 11 additions and 7 deletions

View File

@ -9,8 +9,8 @@
%
% Contributions to this file:
% Author: Theofrastos Mantadelis
% $Date: 2011-02-01 18:36:41 +0100 (Tue, 01 Feb 2011) $
% $Revision: 7 $
% $Date: 2011-02-04 16:04:49 +0100 (Fri, 04 Feb 2011) $
% $Revision: 11 $
% Contributions: The timer implementation is inspired by Bernd Gutmann's timers
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -394,4 +394,4 @@ timer_pause(Name, Elapsed):-
retract('$timer'(Name, _, StartTime)),
statistics(walltime, [EndTime, _]),
Elapsed is EndTime - StartTime,
assert('$timer'(Name, paused, Elapsed)).
assertz('$timer'(Name, paused, Elapsed)).

View File

@ -10,8 +10,8 @@
% Contributions to this file:
% Author: Theofrastos Mantadelis
% Sugestions: Bernd Gutmann, Paulo Moura
% $Date: 2011-02-03 17:19:26 +0100 (Thu, 03 Feb 2011) $
% $Revision: 9 $
% $Date: 2011-02-04 16:06:56 +0100 (Fri, 04 Feb 2011) $
% $Revision: 12 $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@ -357,8 +357,12 @@ in_interval_single(Type, (Min, Max)):-
Min < Max,
Max - Min > 0.0.
type_or_inf(_Type, (+inf)):- !.
type_or_inf(_Type, (-inf)):- !.
type_or_inf(Type, Value):-
nonvar(Type), nonvar(Value),
Value == (+inf), !.
type_or_inf(Type, Value):-
nonvar(Type), nonvar(Value),
Value == (-inf), !.
type_or_inf(Type, Value):- call(Type, Value).
in_interval(Type, [Interval|_Rest], Value):-