Re: [eclipse-clp-users] Contributions to ECLiPSe

From: Joachim Schimpf (Independent Contractor) <"Joachim>
Date: Mon, 28 Apr 2008 16:49:16 +0100
Tallys Yunes wrote:
> Well, to help answer my own question, I can test whether the variable is
> real (get_solver_type) and change my eclipse predicate to pick the two 12.0's
> (with get_bounds) and return the list as 12.0..12.0 instead of 12.0__12.0.

You can call test for a bounded-real with breal/1, and decompose it
with breal_bounds/3 (which incidentally also gives sensible results
when given floats, integers or rationals).

> 
> Any other ways of doing it?

We could in fact add an is_breal() function to the C/C++ interface.
However, for the high-level interfaces to Java, Tcl etc, the data
exchange is via EXDR-format, which is meant to represent only common
data types that are available in any langauge, so bounded-reals are out!

What you have done, i.e. converting the data into C++-friendly types
on the ECLiPSe side, is the most sensible way to do it.


-- Joachim
Received on Mon Apr 28 2008 - 08:50:39 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST