How to interface Pajek with C/C++

This is a discussion on How to interface Pajek with C/C++ within the C Programming forums, part of the General Programming Boards category; Hello all, I have made a C program that produces data for food-web network i.e. it generates the data of ...

  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    11

    How to interface Pajek with C/C++

    Hello all,

    I have made a C program that produces data for food-web network i.e. it generates the data of network consisting of species (NODES) and predator-prey interactions (LINKS). As my program runs, I keep evolving/changing the network at regular intervals of time i.e. the no. of nodes & links change.
    Now to visualize a particular network, I can use the software PAJEK.

    But since I have network evolution in regular intervals, I need to visualize all the networks that are generated due to the network evolution.

    How do I interface Pajek with my C program, so that whenever I do a network evolution in the program, I form a new image of the network using Pajek (and thus enabling me to form images of all the networks whose data I generate) ?
    OR should I use a shell script for the same ?
    (I am working in Linux and am running Pajek using wine.)

    Whichever way, please suggest me a solution since a very important and urgent work of mine is fast approaching the deadline and getting delayed just because of my inability to visualize my networks.

    PLEASE HELP
    Regards
    Alice

  2. #2
    Registered User
    Join Date
    Nov 2010
    Location
    Long Beach, CA
    Posts
    5,555
    From what you've described, I don't think a shell script is the solution. You would only do that if your C program stopped after each evolution. As for running Pajek from your C program, take a look at this tutorial: Cprogramming.com FAQ > Run a program from within a program. I usually use the system() function to take care of stuff like this in Linux.

    There is also a free graph visualization tool for Linux called GraphViz (Home | Graphviz - Graph Visualization Software), that I think has an API you can use directly in your C program.

  3. #3
    Registered User
    Join Date
    Oct 2010
    Posts
    11

    Thanx anduril

    Thanx anduril,

    I am trying it & have been trying it with some success.

    Thanx a lot for replying.

    Regards
    Alice

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Seperating interface and implementation
    By Swerve in forum C++ Programming
    Replies: 2
    Last Post: 01-27-2010, 07:59 PM
  2. How to get RSSI value, send to sensor, sensor receive package, repackage it?
    By techissue2008 in forum Networking/Device Communication
    Replies: 1
    Last Post: 03-04-2009, 09:13 AM
  3. Calling IRichEditOle interface methods
    By Niara in forum C Programming
    Replies: 2
    Last Post: 01-16-2009, 12:23 PM
  4. game user interface
    By DavidP in forum Game Programming
    Replies: 3
    Last Post: 06-19-2004, 12:44 PM
  5. OOP in C
    By lyx in forum C Programming
    Replies: 4
    Last Post: 11-23-2003, 12:12 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21