So, you mean you have a mesh which you would like to cast stencil shadows, but the edge lists haven't been built?
In which case, just call "buildEdgeList" on the mesh and Ogre will do it for you.
Or, do you mean you want to manually calculate the edge lists? In which case, don't. Let Ogre do it for you, see above.
If you still want to create the edge lists yourself, then look at the Ogre code and see how it's done there, then plug in whatever calculation methods you like.
-----------------------------------
Details:
-----------------------------------
Error #: 6
Function: EdgeListBuilder::createEdge
Description: Edge is shared by too many triangles.
File: D:\My Space\OGRE\ogrenew_CVS\OgreMain\src\OgreEdgeListBuilder.cpp
Line: 468
Stack unwinding: <<beginning of stack>>
11:50:40: RECOVERY: attempting to find valid hull by assuming all individual submeshes are manifold with their own geometry...
11:50:40: An exception has been thrown!
-----------------------------------
Details:
-----------------------------------
Error #: 6
Function: EdgeListBuilder::createEdge
Description: Edge is shared by too many triangles.
File: D:\My Space\OGRE\ogrenew_CVS\OgreMain\src\OgreEdgeListBuilder.cpp
Line: 468
Stack unwinding: <<beginning of stack>>
11:50:40: WARNING: edge calculation process detected ambiguous hull. This is almost certainly going to result in stencil shadow artefacts.