|
From: Gary P. <gpa...@gm...> - 2008-11-17 05:52:27
|
Hi,
I'm glad you're finding your feet :)
As for the xsd:
W3C defines that an XSD dictates:
* defines elements that can appear in a document
* defines attributes that can appear in a document
* defines which elements are child elements
* defines the order of child elements
* defines the number of child elements
* defines whether an element is empty or can include text
* defines data types for elements and attributes
* defines default and fixed values for elements and attributes
With that in mind, CIlib has been designed as a library of algorithms,
with each algorithm (including it's component parts) implemented as
JavaBeans.
This implies that for each member in each class, there should be an
associated getter / setter method if that property is to be exposed.
The XML files of CIlib use "the code itself" as the XML specifications.
This means that a predefined XSD is simply *not* possible.
Let me demonstrate, in the following XML snippet:
<algorithm class="pso.PSO" >
<topology class="entity.topologies.LBestTopology">
<neighbourhoodSize
class="controlparameters.ConstantControlParameter" parameter="3" />
</topology>
</algorithm>
Dictates that the current algorithm will be an instance of the
net.sourceforge.cilib.pso.PSO class (note that the net.sourceforge.cilib
is automatically prepended to make your life a little simpler). This
class in turn has a property on it called "topology" which we want to be
an LBestTopology. The LBestTopology in turn has a property on it called
'neighbourhoodSize' which we set to a value of 3.
The above XML can also be written as:
<algorithm class="pso.PSO" >
<topology class="entity.topologies.LBestTopology">
<neighbourhoodSize class="controlparameters.ConstantControlParameter">
<parameter value="3" />
</neighbourhoodSize>
</topology>
</algorithm>
As a result the properties can be set either as sub elements or as
attributes, with the exception of objects that need to be instantiated.
I hope this clears it up :)
Regards,
Gary
lab...@gm... wrote:
> Thanks. I'm planning on using it for an upcoming project, so I'll have
> lots of questions.
> I'm starting to get the hang of it and I'm using it by writing code for
> it but if I might want to specify some parameters through an xml file in
> the future. Where is the cilib.xsd?
>
>
> On Nov 13, 2008 2:24am, Gary Pampara <gpa...@gm...> wrote:
>> Hi all,
>>
>>
>>
>> We have released version 0.6.12 of CIlib.
>>
>>
>>
>> New features include many bug fixes and the inclusion of the Artificial
>>
>> Bee Colony algorithm.
>>
>>
>>
>> For more information, please consult the change log available on the
>>
>> CIlib website under the Project Information tab.
>>
>>
>>
>> Regards,
>>
>> Gary
>>
>>
>>
>> -------------------------------------------------------------------------
>>
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
>>
>> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
>>
>> Grand prize is a trip for two to an Open Source event anywhere in the
> world
>>
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>
>> _______________________________________________
>>
>> Cilib-users mailing list
>>
>> Cil...@li...
>>
>> https://lists.sourceforge.net/lists/listinfo/cilib-users
>>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Cilib-users mailing list
> Cil...@li...
> https://lists.sourceforge.net/lists/listinfo/cilib-users
|