|
List Info
Thread:
|
|
|

|
2006-09-21 22:52:21 |
Forwarding for a colleague who can't seem to get his email
subscription
to work. He's starting with a quote of an email from Daniel
earlier up
the list, when we ran over the missing python implemention
of the range
types.
Ross
----- Forwarded message from "Brian N. West"
<bnwest rice.edu> -----
Delivery-date: Thu, 21 Sep 2006 15:51:52 -0500
Date: Thu, 21 Sep 2006 15:44:46 -0500
From: "Brian N. West" <bnwest rice.edu>
To: "Ross J. Reedstrom" <reedstrm rice.edu>
Subject: xml mailing list ...
Daniel Veillard said:
> Hum, yeah, that must be the binding missing support
from the extra
> XPath types (XPATH_POINT, XPATH_RANGE and
XPATH_LOCATIONSET), I guess
> nobody tried to really use them from Python, you're in
unknown land.
> Probably libxml_xmlXPathObjectPtrWrap() should be
augmented to
> handle them (python/types.c around line 397), and
convert them to Python
> type. I don't know what would be the best way to
represent a point,
> maybe a tuple made of a node and an index.
> I would be glad to get patches and some example to
run the regression
tests
> from python/test/ !
>
> Thanks in advance
We made the following changes to
libxml_xmlXPathObjectPtrWrap():
case XPATH_POINT:
We create a 'point' tuple with contains the node and an
index:
node = libxml_xmlNodePtrWrap(obj->user);
indexIntoNode = PyInt_FromLong((long) obj->index);
ret = PyTuple_New(2);
PyTuple_SetItem(ret, 0, node);
PyTuple_SetItem(ret, 1, indexIntoNode);
case XPATH_RANGE:
We create a list (PyList) with two point tuples (PyTuples),
or one point tuple if range is collapsed.
case XPATH_LOCATIONSET:
We create a list (PyList) with an entry per XPath Object
contained in the
location set. We call libxml_xmlXPathObjectPtrWrap()
recursively for each
XPath Object.
for our python test of interest:
xp='xpointer(string-range(id("para1"),"Ge
ometric",9,1))'
libxml_xmlXPathObjectPtrWrap() gets called with a Location
Set with one
XPath Object which is a Range. We build :
a PyList (Location Set) which contain one PyList (Range)
which contains two point PyTuples.
At some point after libxml_xmlXPathObjectPtrWrap() is
returned, a call is
made to libxml_type() where we experience a memory access
error. Within a
call is made to
PyArg_ParseTuple(args, (char *) "O:last",
&obj)
followed by
cur = PyxmlNode_Get(obj)
which leaves us with a 'cur' of value 1, instead of a
valid memory pointer.
Deferencing cur causes the memory access error.
FWIW stack trace at error is:
(gdb) where
#0 libxml_type (self=0x0, args=0xb7dcc14c) at libxml.c:2566
#1 0x080b6a11 in PyEval_EvalFrame ()
#2 0x080b580c in PyEval_EvalFrame ()
#3 0x080b726d in PyEval_EvalCodeEx ()
#4 0x080fb6fd in PyFunction_SetClosure ()
#5 0x0805950c in PyObject_Call ()
#6 0x080afed7 in PyEval_CallObjectWithKeywords ()
#7 0x080a995f in _PyUnicodeUCS4_IsNumeric ()
#8 0x080b6a11 in PyEval_EvalFrame ()
#9 0x080b580c in PyEval_EvalFrame ()
#10 0x080b580c in PyEval_EvalFrame ()
#11 0x080b726d in PyEval_EvalCodeEx ()
#12 0x080b73ae in PyEval_EvalCode ()
#13 0x080d8ffc in PyRun_FileExFlags ()
#14 0x080d929c in PyRun_SimpleFileExFlags ()
#15 0x08055a06 in Py_Main ()
#16 0xb7e52ea2 in __libc_start_main () from
/lib/tls/i686/cmov/libc.so.6
#17 0x08054f21 in _start ()
and obj has a value of
(gdb) print obj
$1 = (PyObject *) 0xb7dc5dec
(gdb) print *obj
$2 = {ob_refcnt = 6, ob_type = 0x81168c0}
The initial stack trace to the first call of
libxml_xmlXPathObjectPtrWrap()
is
(gdb) where
#0 libxml_xmlXPathObjectPtrWrap (obj=0x830fac8) at
types.c:486
#1 0xb7b223a5 in libxml_xmlXPtrEval (self=0x0,
args=0xb7d48e2c) at
libxml2-py.c:7107
#2 0x080b6a11 in PyEval_EvalFrame ()
#3 0x080b580c in PyEval_EvalFrame ()
#4 0x080b726d in PyEval_EvalCodeEx ()
#5 0x080b73ae in PyEval_EvalCode ()
#6 0x080d8ffc in PyRun_FileExFlags ()
#7 0x080d929c in PyRun_SimpleFileExFlags ()
#8 0x08055a06 in Py_Main ()
#9 0xb7dceea2 in __libc_start_main () from
/lib/tls/i686/cmov/libc.so.6
#10 0x08054f21 in _start ()
It is a mystery to us why libxml_type() is being called.
Any thoughts?
thanks in advance.
----- End forwarded message -----
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
|
|
|

|
2006-09-22 06:49:25 |
On Thu, Sep 21, 2006 at 05:52:21PM -0500, Ross J. Reedstrom
wrote:
> Forwarding for a colleague who can't seem to get his
email subscription
> to work.
I didn't see any bounce, very strange, try again !
> He's starting with a quote of an email from Daniel
earlier up
> the list, when we ran over the missing python
implemention of the range
> types.
okay
> ----- Forwarded message from "Brian N.
West" <bnwest rice.edu> -----
>
> Delivery-date: Thu, 21 Sep 2006 15:51:52 -0500
> Date: Thu, 21 Sep 2006 15:44:46 -0500
> From: "Brian N. West" <bnwest rice.edu>
> To: "Ross J. Reedstrom" <reedstrm rice.edu>
> Subject: xml mailing list ...
>
> Daniel Veillard said:
> > Hum, yeah, that must be the binding missing
support from the extra
> > XPath types (XPATH_POINT, XPATH_RANGE and
XPATH_LOCATIONSET), I guess
> > nobody tried to really use them from Python,
you're in unknown land.
> > Probably libxml_xmlXPathObjectPtrWrap() should
be augmented to
> > handle them (python/types.c around line 397), and
convert them to Python
> > type. I don't know what would be the best way to
represent a point,
> > maybe a tuple made of a node and an index.
> > I would be glad to get patches and some example
to run the regression
> tests
> > from python/test/ !
> >
> > Thanks in advance
>
>
> We made the following changes to
libxml_xmlXPathObjectPtrWrap():
>
> case XPATH_POINT:
>
> We create a 'point' tuple with contains the node and
an index:
>
> node = libxml_xmlNodePtrWrap(obj->user);
> indexIntoNode = PyInt_FromLong((long) obj->index);
>
> ret = PyTuple_New(2);
> PyTuple_SetItem(ret, 0, node);
> PyTuple_SetItem(ret, 1, indexIntoNode);
>
> case XPATH_RANGE:
>
> We create a list (PyList) with two point tuples
(PyTuples),
> or one point tuple if range is collapsed.
>
> case XPATH_LOCATIONSET:
>
> We create a list (PyList) with an entry per XPath
Object contained in the
> location set. We call libxml_xmlXPathObjectPtrWrap()
recursively for each
> XPath Object.
>
> for our python test of interest:
>
>
xp='xpointer(string-range(id("para1"),"Ge
ometric",9,1))'
>
> libxml_xmlXPathObjectPtrWrap() gets called with a
Location Set with one
> XPath Object which is a Range. We build :
>
> a PyList (Location Set) which contain one PyList
(Range)
> which contains two point PyTuples.
Okay, that sound fine.
> At some point after libxml_xmlXPathObjectPtrWrap() is
returned, a call is
> made to libxml_type() where we experience a memory
access error. Within a
> call is made to
>
> PyArg_ParseTuple(args, (char *) "O:last",
&obj)
>
> followed by
>
> cur = PyxmlNode_Get(obj)
>
> which leaves us with a 'cur' of value 1, instead of a
valid memory pointer.
> Deferencing cur causes the memory access error.
Hum, you need to chase where this is really coming from,
it's hard to infer
from the stack trace since whatever called libxml_type() is
not shown.
It is likely to be in the wrapper taking the low level
python object
to convert it to a instance of the classes in libxml2.py .
Check
xmlCore.get_type, add debug there if necessary. Check the
wrapper when
doing the reentrancy in the .py code when returning from C.
> It is a mystery to us why libxml_type() is being
called.
>
> Any thoughts?
Something is being seen as an xmlCore (i.e. a node) and
that is used
when building a node instance from a low level wrapper
object. Add
debug around get_type()
Daniel
--
Red Hat Virtualization group http://redhat.com/v
irtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ |
Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
|
|
| PATCH: XPOINTER and friends |

|
2006-09-29 22:39:08 |
Daniel and all:
I'm writing on behalf of Brian West, Stefan Anca and myself.
By merging
all our brains, we've come up with a candidate
implementation of python
wrapper code for returning XPATH_POINT, XPATH_RANGE,
XPATH_LOCATIONSET.
We've choosen to represent a POINT as a tuple of a node and
an integer
offset into the content of the node. A RANGE then is a list
of POINTs,
and a LOCATIONSET is a list of RANGEs.
I've attached a diff against CVS head (from repository at
anoncvs.gnome.org:/cvs/gnome/libxml2 ), with new files as
separate
attachements.
There's a bit of impedance mis-match between xpointer's 1
based offsets
to points between characters, and python 0 based indexes
into character
array-like strings. We chose not to attempt to adjust those.
The final hurdle was to fixup xpathObjectRet() to not assume
any list
was a list of nodes (since we've got ints in there as well).
This did
cause one change in the API from the python side:
previously, tuples of
nodes were returned as a list. We preserve the tupleness of
those now.
Looks like all other uses of python tuples are in error
handlers or as
arguments to PyEval: none were passed to xpathObjectRet.
A student working with us even coded up some tests, which
I've attached
as well: they need to be dropped in python/tests. They may
need fixing
up to match your test machinery. Right now, they're a bit
chatty.
Ross
--
Ross Reedstrom, Ph.D.
reedstrm rice.edu
Research Scientist phone:
713-348-6166
The Connexions Project http://cnx.org fax:
713-348-3665
Rice University MS-375, Houston, TX 77005
GPG Key fingerprint = F023 82C8 9B0E 2CC6 0D8E F888 D3AE
810E 88F0 BEDE
Index: libxml.py
============================================================
=======
RCS file: /cvs/gnome/libxml2/python/libxml.py,v
retrieving revision 1.39
diff -u -r1.39 libxml.py
--- libxml.py 26 Jun 2006 18:25:39 -0000 1.39
+++ libxml.py 29 Sep 2006 22:31:21 -0000
 -552,10
+552,17 
return xmlNode(_obj=o)
def xpathObjectRet(o):
- if type(o) == type([]) or type(o) == type(()):
- ret = map(lambda x: nodeWrap(x), o)
+ otype = type(o)
+ if otype == type([]):
+ ret = map(xpathObjectRet, o)
return ret
- return o
+ elif otype == type(()):
+ ret = map(xpathObjectRet, o)
+ return tuple(ret)
+ elif otype == type('') or otype == type(0) or otype ==
type(0.0):
+ return o
+ else:
+ return nodeWrap(o)
#
# register an XPath function
Index: types.c
============================================================
=======
RCS file: /cvs/gnome/libxml2/python/types.c,v
retrieving revision 1.21
diff -u -r1.21 types.c
--- types.c 18 Jun 2006 17:40:53 -0000 1.21
+++ types.c 29 Sep 2006 22:31:21 -0000
 -395,8
+395,106 
ret = PyString_FromString((char *)
obj->stringval);
break;
case XPATH_POINT:
+ {
+ PyObject *node;
+ PyObject *indexIntoNode;
+ PyObject *tuple;
+
+ node = libxml_xmlNodePtrWrap(obj->user);
+ indexIntoNode = PyInt_FromLong((long)
obj->index);
+
+ tuple = PyTuple_New(2);
+ PyTuple_SetItem(tuple, 0, node);
+ PyTuple_SetItem(tuple, 1, indexIntoNode);
+
+ ret = tuple;
+ break;
+ }
case XPATH_RANGE:
+ {
+ unsigned short bCollapsedRange;
+
+ bCollapsedRange = ( (obj->user2 == NULL) ||
+ ((obj->user2 == obj->user)
&& (obj->index == obj->index2)) );
+ if ( bCollapsedRange ) {
+ PyObject *node;
+ PyObject *indexIntoNode;
+ PyObject *tuple;
+ PyObject *list;
+
+ list = PyList_New(1);
+
+ node = libxml_xmlNodePtrWrap(obj->user);
+ indexIntoNode = PyInt_FromLong((long)
obj->index);
+
+ tuple = PyTuple_New(2);
+ PyTuple_SetItem(tuple, 0, node);
+ PyTuple_SetItem(tuple, 1, indexIntoNode);
+
+ PyList_SetItem(list, 0, tuple);
+
+ ret = list;
+ } else {
+ PyObject *node;
+ PyObject *indexIntoNode;
+ PyObject *tuple;
+ PyObject *list;
+
+ list = PyList_New(2);
+
+ node = libxml_xmlNodePtrWrap(obj->user);
+ indexIntoNode = PyInt_FromLong((long)
obj->index);
+
+ tuple = PyTuple_New(2);
+ PyTuple_SetItem(tuple, 0, node);
+ PyTuple_SetItem(tuple, 1, indexIntoNode);
+
+ PyList_SetItem(list, 0, tuple);
+
+ node =
libxml_xmlNodePtrWrap(obj->user2);
+ indexIntoNode = PyInt_FromLong((long)
obj->index2);
+
+ tuple = PyTuple_New(2);
+ PyTuple_SetItem(tuple, 0, node);
+ PyTuple_SetItem(tuple, 1, indexIntoNode);
+
+ PyList_SetItem(list, 1, tuple);
+
+ ret = list;
+ }
+ break;
+ }
case XPATH_LOCATIONSET:
+ {
+ xmlLocationSetPtr set;
+
+ set = obj->user;
+ if ( set && set->locNr > 0 ) {
+ int i;
+ PyObject *list;
+
+ list = PyList_New(set->locNr);
+
+ for (i=0; i<set->locNr; i++) {
+ xmlXPathObjectPtr setobj;
+ PyObject *pyobj;
+
+ setobj = set->locTab[i];
/*xmlXPathObjectPtr setobj*/
+
+ pyobj =
libxml_xmlXPathObjectPtrWrap(setobj);
+ /* xmlXPathFreeObject(setobj) is called
*/
+ set->locTab[i] = NULL;
+
+ PyList_SetItem(list, i, pyobj);
+ }
+ set->locNr = 0;
+ ret = list;
+ } else {
+ Py_INCREF(Py_None);
+ ret = Py_None;
+ }
+ break;
+ }
default:
#ifdef DEBUG
printf("Unable to convert XPath object
type %dn", obj->type);
Index: tests/Makefile.am
============================================================
=======
RCS file: /cvs/gnome/libxml2/python/tests/Makefile.am,v
retrieving revision 1.43
diff -u -r1.43 Makefile.am
--- tests/Makefile.am 26 Jun 2006 18:25:40 -0000 1.43
+++ tests/Makefile.am 29 Sep 2006 22:31:21 -0000
 -5,6
+5,7 
attribs.py
tst.py
tstxpath.py
+ tstxpointer.py
xpathext.py
push.py
pushSAX.py
<?xml version="1.0" encoding="utf-8"
standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5
plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd&q
uot;>
<document xmlns="http://cnx.rice.edu/c
nxml" xmlns:m="http://www.w
3.org/1998/Math/MathML" xmlns:md="http://cnx.rice.ed
u/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/
" id="m10035">
<name>Geometric Representation of Modulation
Signals</name>
<metadata>
<md:version>2.13</md:version>
<md:created>2001/06/01</md:created>
<md:revised>2005/09/19 13:36:15.537
GMT-5</md:revised>
<md:authorlist>
<md:author id="aaz">
<md:firstname>Behnaam</md:firstname>
<md:surname>Aazhang</md:surname>
<md:email>aaz ece.rice.edu</md:email>
</md:author>
</md:authorlist>
<md:maintainerlist>
<md:maintainer id="dinesh">
<md:firstname>Dinesh</md:firstname>
<md:surname>Rajan</md:surname>
<md:email>dinesh ece.rice.edu</md:email>
</md:maintainer>
<md:maintainer id="mohammad">
<md:firstname>Mohammad</md:firstname>
<md:othername>Jaber</md:othername>
<md:surname>Borran</md:surname>
<md:email>mohammad ece.rice.edu</md:email>
</md:maintainer>
<md:maintainer id="rha">
<md:firstname>Roy</md:firstname>
<md:surname>Ha</md:surname>
<md:email>rha rice.edu</md:email>
</md:maintainer>
<md:maintainer id="mrshawn">
<md:firstname>Shawn</md:firstname>
<md:surname>Stewart</md:surname>
<md:email>mrshawn alumni.rice.edu</md:email>
</md:maintainer>
<md:maintainer id="aaz">
<md:firstname>Behnaam</md:firstname>
<md:surname>Aazhang</md:surname>
<md:email>aaz ece.rice.edu</md:email>
</md:maintainer>
</md:maintainerlist>
<md:keywordlist>
<md:keyword>bases</md:keyword>
<md:keyword>basis</md:keyword>
<md:keyword>geometric
representation</md:keyword>
<md:keyword>orthogonal</md:keyword>
<md:keyword>signal</md:keyword>
</md:keywordlist>
<md:abstract>Geometric representation of signals
provides a compact, alternative characterization of
signals.</md:abstract>
</metadata>
<content>
<para id="para1">
Geometric representation of signals can provide a
compact
characterization of signals and can simplify analysis
of their
performance as modulation signals.
</para>
<para id="para2">
Orthonormal bases are essential in geometry. Let
<m:math>
<m:set>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mn>1</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mn>2</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:ci>…</m:ci>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mi>M</m:mi>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
</m:set>
</m:math>
be a set of signals.
</para>
<para id="para3">
Define
<m:math>
<m:apply>
<m:eq/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>ψ</m:mi>
<m:mn>1</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:divide/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mn>1</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:root/>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mn>1</m:mn>
</m:msub>
</m:ci>
</m:apply>
</m:apply>
</m:apply>
</m:math>
where
<m:math>
<m:apply>
<m:eq/>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mn>1</m:mn>
</m:msub>
</m:ci>
<m:apply>
<m:int/>
<m:bvar>
<m:ci>t</m:ci>
</m:bvar>
<m:lowlimit>
<m:cn>0</m:cn>
</m:lowlimit>
<m:uplimit>
<m:ci>T</m:ci>
</m:uplimit>
<m:apply>
<m:power/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mn>1</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:cn>2</m:cn>
</m:apply>
</m:apply>
</m:apply>
</m:math>.
</para>
<para id="para4">
Define
<m:math>
<m:apply>
<m:eq/>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mn>21</m:mn>
</m:msub>
</m:ci>
<m:apply>
<m:scalarproduct/>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mn>2</m:mn>
</m:msub>
</m:ci>
<m:ci>
<m:msub>
<m:mi>ψ</m:mi>
<m:mn>1</m:mn>
</m:msub>
</m:ci>
</m:apply>
<m:apply>
<m:int/>
<m:bvar>
<m:ci>t</m:ci>
</m:bvar>
<m:lowlimit>
<m:cn>0</m:cn>
</m:lowlimit>
<m:uplimit>
<m:ci>T</m:ci>
</m:uplimit>
<m:apply>
<m:times/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mn>2</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:conjugate/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>ψ</m:mi>
<m:mn>1</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
</m:apply>
</m:apply>
</m:apply>
</m:apply>
</m:math>
and
<m:math>
<m:apply>
<m:eq/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>ψ</m:mi>
<m:mn>2</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:times/>
<m:apply>
<m:divide/>
<m:cn>1</m:cn>
<m:apply>
<m:root/>
<m:ci>
<m:mover>
<m:msub>
<m:mi>E</m:mi>
<m:mn>2</m:mn>
</m:msub>
<m:mo>^</m:mo>
</m:mover>
</m:ci>
</m:apply>
</m:apply>
<m:apply>
<m:minus/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mn>2</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:times/>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mn>21</m:mn>
</m:msub>
</m:ci>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>ψ</m:mi>
<m:mn>1</m:mn>
</m:msub>
</m:ci>
</m:apply>
</m:apply>
</m:apply>
</m:apply>
</m:apply>
</m:math>
where
<m:math>
<m:apply>
<m:eq/>
<m:ci>
<m:mover>
<m:msub>
<m:mi>E</m:mi>
<m:mn>2</m:mn>
</m:msub>
<m:mo>^</m:mo>
</m:mover>
</m:ci>
<m:apply>
<m:int/>
<m:bvar>
<m:ci>t</m:ci>
</m:bvar>
<m:lowlimit>
<m:cn>0</m:cn>
</m:lowlimit>
<m:uplimit>
<m:ci>T</m:ci>
</m:uplimit>
<m:apply>
<m:power/>
<m:apply>
<m:minus/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mn>2</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:times/>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mn>21</m:mn>
</m:msub>
</m:ci>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>ψ</m:mi>
<m:mn>1</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
</m:apply>
</m:apply>
<m:cn>2</m:cn>
</m:apply>
</m:apply>
</m:apply>
</m:math>
</para>
<para id="para5">
In general
<equation id="eq01">
<m:math>
<m:apply>
<m:eq/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>ψ</m:mi>
<m:mi>k</m:mi>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:times/>
<m:apply>
<m:divide/>
<m:cn>1</m:cn>
<m:apply>
<m:root/>
<m:ci>
<m:mover>
<m:msub>
<m:mi>E</m:mi>
<m:mi>k</m:mi>
</m:msub>
<m:mo>^</m:mo>
</m:mover>
</m:ci>
</m:apply>
</m:apply>
<m:apply>
<m:minus/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mi>k</m:mi>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:sum/>
<m:bvar>
<m:ci>j</m:ci>
</m:bvar>
<m:lowlimit>
<m:cn>1</m:cn>
</m:lowlimit>
<m:uplimit>
<m:apply>
<m:minus/>
<m:ci>k</m:ci>
<m:cn>1</m:cn>
</m:apply>
</m:uplimit>
<m:apply>
<m:times/>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mi>kj</m:mi>
</m:msub>
</m:ci>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>ψ</m:mi>
<m:mi>j</m:mi>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
</m:apply>
</m:apply>
</m:apply>
</m:apply>
</m:apply>
</m:math>
</equation>
where
<m:math>
<m:apply>
<m:eq/>
<m:ci>
<m:mover>
<m:msub>
<m:mi>E</m:mi>
<m:mi>k</m:mi>
</m:msub>
<m:mo>^</m:mo>
</m:mover>
</m:ci>
<m:apply>
<m:int/>
<m:bvar>
<m:ci>t</m:ci>
</m:bvar>
<m:lowlimit>
<m:cn>0</m:cn>
</m:lowlimit>
<m:uplimit>
<m:ci>T</m:ci>
</m:uplimit>
<m:apply>
<m:power/>
<m:apply>
<m:minus/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mi>k</m:mi>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:sum/>
<m:bvar>
<m:ci>j</m:ci>
</m:bvar>
<m:lowlimit>
<m:cn>1</m:cn>
</m:lowlimit>
<m:uplimit>
<m:apply>
<m:minus/>
<m:ci>k</m:ci>
<m:cn>1</m:cn>
</m:apply>
</m:uplimit>
<m:apply>
<m:times/>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mi>kj</m:mi>
</m:msub>
</m:ci>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>ψ</m:mi>
<m:mi>j</m:mi>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
</m:apply>
</m:apply>
</m:apply>
<m:cn>2</m:cn>
</m:apply>
</m:apply>
</m:apply>
</m:math>.
</para>
<para id="para6">
The process continues until all of the
<m:math><m:ci>M</m:ci>
</m:math> signals are exhausted. The results
are
<m:math><m:ci>N</m:ci>
</m:math> orthogonal signals with unit
energy,
<m:math>
<m:set>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>ψ</m:mi>
<m:mn>1</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>ψ</m:mi>
<m:mn>2</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:ci>…</m:ci>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>ψ</m:mi>
<m:mi>N</m:mi>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
</m:set>
</m:math>
where
<m:math>
<m:apply>
<m:leq/>
<m:ci>N</m:ci>
<m:ci>M</m:ci>
</m:apply>
</m:math>.
If the signals
<m:math>
<m:set>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mn>1</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:ci>…</m:ci>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mi>M</m:mi>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
</m:set>
</m:math>
are linearly independent, then
<m:math>
<m:apply>
<m:eq/>
<m:ci>N</m:ci>
<m:ci>M</m:ci>
</m:apply>
</m:math>.
</para>
<para id="para7">
The <m:math><m:ci>M</m:ci>
</m:math> signals can be represented
as
<equation id="eq02">
<m:math>
<m:apply>
<m:eq/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mi>m</m:mi>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:sum/>
<m:bvar>
<m:ci>n</m:ci>
</m:bvar>
<m:lowlimit>
<m:cn>1</m:cn>
</m:lowlimit>
<m:uplimit>
<m:ci>N</m:ci>
</m:uplimit>
<m:apply>
<m:times/>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mi>mn</m:mi>
</m:msub>
</m:ci>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>ψ</m:mi>
<m:mi>n</m:mi>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
</m:apply>
</m:apply>
</m:apply>
</m:math>
</equation>
with
<m:math>
<m:apply>
<m:in/>
<m:ci>m</m:ci>
<m:set>
<m:cn>1</m:cn>
<m:cn>2</m:cn>
<m:ci>…</m:ci>
<m:ci>M</m:ci>
</m:set>
</m:apply>
</m:math>
where
<m:math>
<m:apply>
<m:eq/>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mi>mn</m:mi>
</m:msub>
</m:ci>
<m:apply>
<m:scalarproduct/>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mi>m</m:mi>
</m:msub>
</m:ci>
<m:ci>
<m:msub>
<m:mi>ψ</m:mi>
<m:mi>n</m:mi>
</m:msub>
</m:ci>
</m:apply>
</m:apply>
</m:math>
and
<m:math>
<m:apply>
<m:eq/>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mi>m</m:mi>
</m:msub>
</m:ci>
<m:apply>
<m:sum/>
<m:bvar>
<m:ci>n</m:ci>
</m:bvar>
<m:lowlimit>
<m:cn>1</m:cn>
</m:lowlimit>
<m:uplimit>
<m:ci>N</m:ci>
</m:uplimit>
<m:apply>
<m:power/>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mi>mn</m:mi>
</m:msub>
</m:ci>
<m:cn>2</m:cn>
</m:apply>
</m:apply>
</m:apply>
</m:math>.
The signals can be represented by
<m:math>
<m:apply>
<m:eq/>
<m:ci type="vector"><m:msub>
<m:mi>s</m:mi>
<m:mi>m</m:mi>
</m:msub></m:ci>
<m:vector>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mrow><m:mi>m</m:mi><m:mn>1</m:
mn>
</m:mrow>
</m:msub>
</m:ci>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mrow><m:mi>m</m:mi><m:mn>2</m:
mn>
</m:mrow>
</m:msub>
</m:ci>
<m:ci>⋮</m:ci>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mi>mN</m:mi>
</m:msub>
</m:ci>
</m:vector>
</m:apply>
</m:math>
</para>
<example id="example1">
<figure id="fig1">
<media type="image/png"
src="Figure4-9_1.png"/>
</figure>
<para id="para8">
<equation id="eq03">
<m:math>
<m:apply>
<m:eq/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>ψ</m:mi>
<m:mn>1</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:divide/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mn>1</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:root/>
<m:apply>
<m:times/>
<m:apply>
<m:power/>
<m:ci>A</m:ci>
<m:cn>2</m:cn>
</m:apply>
<m:ci>T</m:ci>
</m:apply>
</m:apply>
</m:apply>
</m:apply>
</m:math>
</equation>
<equation id="eq04">
<m:math>
<m:apply>
<m:eq/>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mn>11</m:mn>
</m:msub>
</m:ci>
<m:apply>
<m:times/>
<m:ci>A</m:ci>
<m:apply>
<m:root/>
<m:ci>T</m:ci>
</m:apply>
</m:apply>
</m:apply>
</m:math>
</equation>
<equation id="eq05">
<m:math>
<m:apply>
<m:eq/>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mn>21</m:mn>
</m:msub>
</m:ci>
<m:apply>
<m:minus/>
<m:apply>
<m:times/>
<m:ci>A</m:ci>
<m:apply>
<m:root/>
<m:ci>T</m:ci>
</m:apply>
</m:apply>
</m:apply>
</m:apply>
</m:math>
</equation>
<equation id="eq06">
<m:math>
<m:apply>
<m:eq/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>ψ</m:mi>
<m:mn>2</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:times/>
<m:apply>
<m:minus/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mn>2</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:times/>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mn>21</m:mn>
</m:msub>
</m:ci>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>ψ</m:mi>
<m:mn>1</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
</m:apply>
</m:apply>
<m:apply>
<m:divide/>
<m:cn>1</m:cn>
<m:apply>
<m:root/>
<m:ci>
<m:mover>
<m:msub>
<m:mi>E</m:mi>
<m:mn>2</m:mn>
</m:msub>
<m:mo>^</m:mo>
</m:mover>
</m:ci>
</m:apply>
</m:apply>
</m:apply>
<m:apply>
<m:times/>
<m:apply>
<m:plus/>
<m:apply>
<m:minus/>
<m:ci>A</m:ci>
</m:apply>
<m:apply>
<m:divide/>
<m:apply>
<m:times/>
<m:ci>A</m:ci>
<m:apply>
<m:root/>
<m:ci>T</m:ci>
</m:apply>
</m:apply>
<m:apply>
<m:root/>
<m:ci>T</m:ci>
</m:apply>
</m:apply>
</m:apply>
<m:apply>
<m:divide/>
<m:cn>1</m:cn>
<m:apply>
<m:root/>
<m:ci>
<m:mover>
<m:msub>
<m:mi>E</m:mi>
<m:mn>2</m:mn>
</m:msub>
<m:mo>^</m:mo>
</m:mover>
</m:ci>
</m:apply>
</m:apply>
</m:apply>
<m:cn>0</m:cn>
</m:apply>
</m:math>
</equation>
</para>
<figure id="fig2">
<media type="image/png"
src="Figure4-9_2.png"/>
</figure>
<para id="para9">
Dimension of the signal set is 1 with
<m:math>
<m:apply>
<m:eq/>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mn>1</m:mn>
</m:msub>
</m:ci>
<m:apply>
<m:power/>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mn>11</m:mn>
</m:msub>
</m:ci>
<m:cn>2</m:cn>
</m:apply>
</m:apply>
</m:math>
and
<m:math>
<m:apply>
<m:eq/>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mn>2</m:mn>
</m:msub>
</m:ci>
<m:apply>
<m:power/>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mn>21</m:mn>
</m:msub>
</m:ci>
<m:cn>2</m:cn>
</m:apply>
</m:apply>
</m:math>.
</para>
</example>
<example id="example2">
<figure id="fig3">
<media type="image/png"
src="Figure4-9_3.png"/>
</figure>
<para id="para10">
<m:math>
<m:apply>
<m:eq/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>ψ</m:mi>
<m:mi>m</m:mi>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:divide/>
<m:apply>
<m:ci type="fn"><m:msub>
<m:mi>s</m:mi>
<m:mi>m</m:mi>
</m:msub></m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:root/>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mi>s</m:mi>
</m:msub>
</m:ci>
</m:apply>
</m:apply>
</m:apply>
</m:math>
where
<m:math>
<m:apply>
<m:eq/>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mi>s</m:mi>
</m:msub>
</m:ci>
<m:apply>
<m:int/>
<m:bvar>
<m:ci>t</m:ci>
</m:bvar>
<m:lowlimit>
<m:cn>0</m:cn>
</m:lowlimit>
<m:uplimit>
<m:ci>T</m:ci>
</m:uplimit>
<m:apply>
<m:power/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mi>m</m:mi>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:cn>2</m:cn>
</m:apply>
</m:apply>
<m:apply>
<m:divide/>
<m:apply>
<m:times/>
<m:apply>
<m:power/>
<m:ci>A</m:ci>
<m:cn>2</m:cn>
</m:apply>
<m:ci>T</m:ci>
</m:apply>
<m:cn>4</m:cn>
</m:apply>
</m:apply>
</m:math>
</para>
<para id="para11">
<m:math>
<m:apply>
<m:eq/>
<m:ci type="vector"><m:msub>
<m:mi>s</m:mi>
<m:mn>1</m:mn>
</m:msub></m:ci>
<m:vector>
<m:apply>
<m:root/>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mi>s</m:mi>
</m:msub>
</m:ci>
</m:apply>
<m:cn>0</m:cn>
<m:cn>0</m:cn>
<m:cn>0</m:cn>
</m:vector>
</m:apply>
</m:math>,
<m:math>
<m:apply>
<m:eq/>
<m:ci type="vector"><m:msub>
<m:mi>s</m:mi>
<m:mn>2</m:mn>
</m:msub></m:ci>
<m:vector>
<m:cn>0</m:cn>
<m:apply>
<m:root/>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mi>s</m:mi>
</m:msub>
</m:ci>
</m:apply>
<m:cn>0</m:cn>
<m:cn>0</m:cn>
</m:vector>
</m:apply>
</m:math>,
<m:math>
<m:apply>
<m:eq/>
<m:ci type="vector"><m:msub>
<m:mi>s</m:mi>
<m:mn>3</m:mn>
</m:msub></m:ci>
<m:vector>
<m:cn>0</m:cn>
<m:cn>0</m:cn>
<m:apply>
<m:root/>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mi>s</m:mi>
</m:msub>
</m:ci>
</m:apply>
<m:cn>0</m:cn>
</m:vector>
</m:apply>
</m:math>, and
<m:math>
<m:apply>
<m:eq/>
<m:ci type="vector"><m:msub>
<m:mi>s</m:mi>
<m:mn>4</m:mn>
</m:msub></m:ci>
<m:vector>
<m:cn>0</m:cn>
<m:cn>0</m:cn>
<m:cn>0</m:cn>
<m:apply>
<m:root/>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mi>s</m:mi>
</m:msub>
</m:ci>
</m:apply>
</m:vector>
</m:apply>
</m:math>
<equation id="eq08">
<m:math>
<m:apply>
<m:forall/>
<m:bvar>
<m:ci>m</m:ci>
<m:ci>n</m:ci>
</m:bvar>
<m:apply>
<m:eq/>
<m:ci>
<m:msub>
<m:mi>d</m:mi>
<m:mi>mn</m:mi>
</m:msub>
</m:ci>
<m:apply>
<m:abs/>
<m:apply>
<m:minus/>
<m:ci type="vector"><m:msub>
<m:mi>s</m:mi>
<m:mi>m</m:mi>
</m:msub></m:ci>
<m:ci type="vector"><m:msub>
<m:mi>s</m:mi>
<m:mi>n</m:mi>
</m:msub></m:ci>
</m:apply>
</m:apply>
<m:apply>
<m:root/>
<m:apply>
<m:sum/>
<m:bvar>
<m:ci>j</m:ci>
</m:bvar>
<m:lowlimit>
<m:cn>1</m:cn>
</m:lowlimit>
<m:uplimit>
<m:ci>N</m:ci>
</m:uplimit>
<m:apply>
<m:power/>
<m:apply>
<m:minus/>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mi>mj</m:mi>
</m:msub>
</m:ci>
<m:ci>
<m:msub>
<m:mi>s</m:mi>
<m:mi>nj</m:mi>
</m:msub>
</m:ci>
</m:apply>
<m:cn>2</m:cn>
</m:apply>
</m:apply>
</m:apply>
<m:apply>
<m:root/>
<m:apply>
<m:times/>
<m:cn>2</m:cn>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mi>s</m:mi>
</m:msub>
</m:ci>
</m:apply>
</m:apply>
</m:apply>
</m:apply>
</m:math>
</equation>
is the Euclidean distance between signals.
</para>
</example>
<example id="example3">
<para id="para12">
Set of 4 equal energy biorthogonal signals.
<m:math>
<m:apply>
<m:eq/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mn>1</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:ci type="fn">s</m:ci>
<m:ci>t</m:ci>
</m:apply>
</m:apply>
</m:math>,
<m:math>
<m:apply>
<m:eq/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mn>2</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:ci type="fn">
<m:msup>
<m:mi>s</m:mi>
<m:mo>⊥</m:mo>
</m:msup>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
</m:apply>
</m:math>,
<m:math>
<m:apply>
<m:eq/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mn>3</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:minus/>
<m:apply>
<m:ci type="fn">s</m:ci>
<m:ci>t</m:ci>
</m:apply>
</m:apply>
</m:apply>
</m:math>,
<m:math>
<m:apply>
<m:eq/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mn>4</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:minus/>
<m:apply>
<m:ci type="fn">
<m:msup>
<m:mi>s</m:mi>
<m:mo>⊥</m:mo>
</m:msup>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
</m:apply>
</m:apply>
</m:math>.
</para>
<para id="para13">
The orthonormal basis
<m:math>
<m:apply>
<m:eq/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>ψ</m:mi>
<m:mn>1</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:divide/>
<m:apply>
<m:ci type="fn">s</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:root/>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mi>s</m:mi>
</m:msub>
</m:ci>
</m:apply>
</m:apply>
</m:apply>
</m:math>,
<m:math>
<m:apply>
<m:eq/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>ψ</m:mi>
<m:mn>2</m:mn>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:divide/>
<m:apply>
<m:ci type="fn">
<m:msup>
<m:mi>s</m:mi>
<m:mo>⊥</m:mo>
</m:msup>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:apply>
<m:root/>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mi>s</m:mi>
</m:msub>
</m:ci>
</m:apply>
</m:apply>
</m:apply>
</m:math>
where
<m:math>
<m:apply>
<m:eq/>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mi>s</m:mi>
</m:msub>
</m:ci>
<m:apply>
<m:int/>
<m:bvar>
<m:ci>t</m:ci>
</m:bvar>
<m:lowlimit>
<m:cn>0</m:cn>
</m:lowlimit>
<m:uplimit>
<m:ci>T</m:ci>
</m:uplimit>
<m:apply>
<m:power/>
<m:apply>
<m:ci type="fn">
<m:msub>
<m:mi>s</m:mi>
<m:mi>m</m:mi>
</m:msub>
</m:ci>
<m:ci>t</m:ci>
</m:apply>
<m:cn>2</m:cn>
</m:apply>
</m:apply>
</m:apply>
</m:math>
</para>
<para id="para14">
<m:math>
<m:apply>
<m:eq/>
<m:ci type="vector"><m:msub>
<m:mi>s</m:mi>
<m:mn>1</m:mn>
</m:msub></m:ci>
<m:vector>
<m:apply>
<m:root/>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mi>s</m:mi>
</m:msub>
</m:ci>
</m:apply>
<m:cn>0</m:cn>
</m:vector>
</m:apply>
</m:math>,
<m:math>
<m:apply>
<m:eq/>
<m:ci type="vector"><m:msub>
<m:mi>s</m:mi>
<m:mn>2</m:mn>
</m:msub></m:ci>
<m:vector>
<m:cn>0</m:cn>
<m:apply>
<m:root/>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mi>s</m:mi>
</m:msub>
</m:ci>
</m:apply>
</m:vector>
</m:apply>
</m:math>,
<m:math>
<m:apply>
<m:eq/>
<m:ci type="vector"><m:msub>
<m:mi>s</m:mi>
<m:mn>3</m:mn>
</m:msub></m:ci>
<m:vector>
<m:apply>
<m:minus/>
<m:apply>
<m:root/>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mi>s</m:mi>
</m:msub>
</m:ci>
</m:apply>
</m:apply>
<m:cn>0</m:cn>
</m:vector>
</m:apply>
</m:math>,
<m:math>
<m:apply>
<m:eq/>
<m:ci type="vector"><m:msub>
<m:mi>s</m:mi>
<m:mn>4</m:mn>
</m:msub></m:ci>
<m:vector>
<m:cn>0</m:cn>
<m:apply>
<m:minus/>
<m:apply>
<m:root/>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mi>s</m:mi>
</m:msub>
</m:ci>
</m:apply>
</m:apply>
</m:vector>
</m:apply>
</m:math>. The four signals can be geometrically
represented using the
4-vector of projection coefficients
<m:math>
<m:ci type="vector"><m:msub>
<m:mi>s</m:mi>
<m:mn>1</m:mn>
</m:msub></m:ci>
</m:math>,
<m:math>
<m:ci type="vector"><m:msub>
<m:mi>s</m:mi>
<m:mn>2</m:mn>
</m:msub></m:ci>
</m:math>,
<m:math>
<m:ci type="vector"><m:msub>
<m:mi>s</m:mi>
<m:mn>3</m:mn>
</m:msub></m:ci>
</m:math>, and
<m:math>
<m:ci type="vector"><m:msub>
<m:mi>s</m:mi>
<m:mn>4</m:mn>
</m:msub></m:ci>
</m:math> as a set of constellation points.
</para>
<figure id="fig4">
<name>Signal constellation</name>
<media type="image/png"
src="Figure4-11.png"/>
</figure>
<para id="para15">
<equation id="eq10">
<m:math>
<m:apply>
<m:eq/>
<m:ci>
<m:msub>
<m:mi>d</m:mi>
<m:mn>21</m:mn>
</m:msub>
</m:ci>
<m:apply>
<m:abs/>
<m:apply>
<m:minus/>
<m:ci type="vector"><m:msub>
<m:mi>s</m:mi>
<m:mn>2</m:mn>
</m:msub></m:ci>
<m:ci type="vector"><m:msub>
<m:mi>s</m:mi>
<m:mn>1</m:mn>
</m:msub></m:ci>
</m:apply>
</m:apply>
<m:apply>
<m:root/>
<m:apply>
<m:times/>
<m:cn>2</m:cn>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mi>s</m:mi>
</m:msub>
</m:ci>
</m:apply>
</m:apply>
</m:apply>
</m:math>
</equation>
<equation id="eq11">
<m:math>
<m:apply>
<m:eq/>
<m:ci>
<m:msub>
<m:mi>d</m:mi>
<m:mn>12</m:mn>
</m:msub>
</m:ci>
<m:ci>
<m:msub>
<m:mi>d</m:mi>
<m:mn>23</m:mn>
</m:msub>
</m:ci>
<m:ci>
<m:msub>
<m:mi>d</m:mi>
<m:mn>34</m:mn>
</m:msub>
</m:ci>
<m:ci>
<m:msub>
<m:mi>d</m:mi>
<m:mn>14</m:mn>
</m:msub>
</m:ci>
</m:apply>
</m:math>
</equation>
<equation id="eq12">
<m:math>
<m:apply>
<m:eq/>
<m:ci>
<m:msub>
<m:mi>d</m:mi>
<m:mn>13</m:mn>
</m:msub>
</m:ci>
<m:apply>
<m:abs/>
<m:apply>
<m:minus/>
<m:ci type="vector"><m:msub>
<m:mi>s</m:mi>
<m:mn>1</m:mn>
</m:msub></m:ci>
<m:ci type="vector"><m:msub>
<m:mi>s</m:mi>
<m:mn>3</m:mn>
</m:msub></m:ci>
</m:apply>
</m:apply>
<m:apply>
<m:times/>
<m:cn>2</m:cn>
<m:apply>
<m:root/>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mi>s</m:mi>
</m:msub>
</m:ci>
</m:apply>
</m:apply>
</m:apply>
</m:math>
</equation>
<equation id="eq13">
<m:math>
<m:apply>
<m:eq/>
<m:ci>
<m:msub>
<m:mi>d</m:mi>
<m:mn>13</m:mn>
</m:msub>
</m:ci>
<m:ci>
<m:msub>
<m:mi>d</m:mi>
<m:mn>24</m:mn>
</m:msub>
</m:ci>
</m:apply>
</m:math>
</equation>
Minimum distance
<m:math>
<m:apply>
<m:eq/>
<m:ci>
<m:msub>
<m:mi>d</m:mi>
<m:mi>min</m:mi>
</m:msub>
</m:ci>
<m:apply>
<m:root/>
<m:apply>
<m:times/>
<m:cn>2</m:cn>
<m:ci>
<m:msub>
<m:mi>E</m:mi>
<m:mi>s</m:mi>
</m:msub>
</m:ci>
</m:apply>
</m:apply>
</m:apply>
</m:math>
</para>
</example>
</content>
</document>
xpointer(string-range(id("para1"),"representa
tion",1,9))
xpointer(id("para4"))
xmlns(def=http://cnx.rice.edu/cnxml
a>) xpointer(/child::def:document/child::def:metadata)
xmlns(m=http://www.w3.org/
1998/Math/MathML)
xpointer(id("para3")/m:math[2])
xmlns(def=http://cnx.rice.edu/cnxml
a>) xmlns(bib=http://bibtexml.sf.net/)
xmlns(m=http://www.w3.org/
1998/Math/MathML) xmlns(md=http://cnx.rice.edu/mdml
/0.4)
xpointer(string-range(id("para1"),"Geometric&
quot;,1,6))
xmlns(def=http://cnx.rice.edu/cnxml
a>) xmlns(bib=http://bibtexml.sf.net/)
xmlns(m=http://www.w3.org/
1998/Math/MathML) xmlns(md=http://cnx.rice.edu/mdml
/0.4) xpointer(/def:document//def:para)
xmlns(m=http://www.w3.org/
1998/Math/MathML)
xpointer(id("para7")//m:math)
xmlns(m=http://www.w3.org/
1998/Math/MathML) xmlns(cnx=http://cnx.rice.edu/cnxml
a>) xpointer(id('para7')/cnx:equation)
xmlns(m=http://www.w3.org/
1998/Math/MathML) xmlns(cnx=http://cnx.rice.edu/cnxml
a>)xpointer(/descendant::m:math[position()=2]/ancestor: [position()=
1])
xmlns(m=http://www.w3.org/
1998/Math/MathML)
xpointer(start-point(string-range(id('para2'),'Orthonormal')
))
xmlns(m=http://www.w3.org/
1998/Math/MathML)
xpointer(end-point(string-range(id('para2'),'Orthonormal')))
xpointer(end-point(string-range(id("para2"),"
essential"))))
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
|
|
| PATCH: XPOINTER and friends |

|
2006-10-10 08:38:13 |
On Fri, Sep 29, 2006 at 05:39:08PM -0500, Ross J. Reedstrom
wrote:
> Daniel and all:
Hi,
I finally had time to work on it.
> I'm writing on behalf of Brian West, Stefan Anca and
myself. By merging
> all our brains, we've come up with a candidate
implementation of python
> wrapper code for returning XPATH_POINT, XPATH_RANGE,
XPATH_LOCATIONSET.
> We've choosen to represent a POINT as a tuple of a node
and an integer
> offset into the content of the node. A RANGE then is a
list of POINTs,
> and a LOCATIONSET is a list of RANGEs.
>
> I've attached a diff against CVS head (from repository
at
> anoncvs.gnome.org:/cvs/gnome/libxml2 ), with new files
as separate
> attachements.
The patch looks just fine to me, I applied it and commited
it to CVS,
thanks a lot !
> There's a bit of impedance mis-match between xpointer's
1 based offsets
> to points between characters, and python 0 based
indexes into character
> array-like strings. We chose not to attempt to adjust
those.
>
> The final hurdle was to fixup xpathObjectRet() to not
assume any list
> was a list of nodes (since we've got ints in there as
well). This did
> cause one change in the API from the python side:
previously, tuples of
> nodes were returned as a list. We preserve the
tupleness of those now.
> Looks like all other uses of python tuples are in error
handlers or as
> arguments to PyEval: none were passed to
xpathObjectRet.
>
> A student working with us even coded up some tests,
which I've attached
> as well: they need to be dropped in python/tests. They
may need fixing
> up to match your test machinery. Right now, they're a
bit chatty.
Right the test as is can't really be commited since it
breaks the no output
assumption of 'make tests' in python. Basically the python
code would have
to embbed the logic of checking the output, instead of
relying on the user
to garantee it's correct (and honnestly it's really not
trivial). Can you
please fix tstxpointer.py to work that way and send it back
?
I also had to roll back the python/test/Makefile.am change
to not reference
tstxpointer.py since I can't commit it as is.
thanks !
thanks !
Daniel
--
Red Hat Virtualization group http://redhat.com/v
irtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ |
Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
|
|
| PATCH: XPOINTER and friends |

|
2006-10-10 15:31:04 |
On Tue, Oct 10, 2006 at 04:38:13AM -0400, Daniel Veillard
wrote:
>
> The patch looks just fine to me, I applied it and
commited it to CVS,
> thanks a lot !
Hey, just doing our open source bit.
> >
> > A student working with us even coded up some
tests, which I've attached
> > as well: they need to be dropped in python/tests.
They may need fixing
> > up to match your test machinery. Right now,
they're a bit chatty.
>
> Right the test as is can't really be commited since
it breaks the no output
> assumption of 'make tests' in python. Basically the
python code would have
> to embbed the logic of checking the output, instead of
relying on the user
> to garantee it's correct (and honnestly it's really not
trivial). Can you
> please fix tstxpointer.py to work that way and send it
back ?
> I also had to roll back the python/test/Makefile.am
change to not reference
> tstxpointer.py since I can't commit it as is.
I've copied Stefan on this note: He'll clean up the tests
and resubmit.
Ross
--
Ross Reedstrom, Ph.D.
reedstrm rice.edu
Research Scientist phone:
713-348-6166
The Connexions Project http://cnx.org fax:
713-348-3665
Rice University MS-375, Houston, TX 77005
GPG Key fingerprint = F023 82C8 9B0E 2CC6 0D8E F888 D3AE
810E 88F0 BEDE
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
|
|
| PATCH: XPOINTER and friends |

|
2006-10-10 15:34:35 |
On Tue, Oct 10, 2006 at 10:31:04AM -0500, Ross J. Reedstrom
wrote:
> On Tue, Oct 10, 2006 at 04:38:13AM -0400, Daniel
Veillard wrote:
> >
> > The patch looks just fine to me, I applied it
and commited it to CVS,
> > thanks a lot !
>
> Hey, just doing our open source bit.
> > >
> > > A student working with us even coded up some
tests, which I've attached
> > > as well: they need to be dropped in
python/tests. They may need fixing
> > > up to match your test machinery. Right now,
they're a bit chatty.
> >
> > Right the test as is can't really be commited
since it breaks the no output
> > assumption of 'make tests' in python. Basically
the python code would have
> > to embbed the logic of checking the output,
instead of relying on the user
> > to garantee it's correct (and honnestly it's
really not trivial). Can you
> > please fix tstxpointer.py to work that way and
send it back ?
> > I also had to roll back the
python/test/Makefile.am change to not reference
> > tstxpointer.py since I can't commit it as is.
>
> I've copied Stefan on this note: He'll clean up the
tests and resubmit.
okay thanks. Checking for the type of the returned objects
and their size
if not strings should in general be sufficient to assert
that the result is
correct.
Daniel
--
Red Hat Virtualization group http://redhat.com/v
irtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ |
Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
|
|
[1-6]
|
|