Search Results

Search found 7220 results on 289 pages for 'graph algorithm'.

Page 11/289 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • facebook graph api does not return all feed items on facebook page

    - by Nick Franceschina
    at the time of this question, if you go here: http://www.facebook.com/realplayer you'll see six posts down, I have posted a photo with a message of "#highfive Cincinnati, OH" but if you to either of these: http://graph.facebook.com/realplayer/feed http://graph.facebook.com/realplayer/tagged the JSON that is returned seemingly includes everything on the wall, except for MY post. there is another photo post from someone else down below mine, and it is showing up (and both my photo and his photo are in the "Fan photos" section) obviously, since I can see everything with these links already, it appears that access_token is not a part of the equation... BUT, some more info: if I use an access_token from a session that isn't me, I can't see the post in the JSON if I use an access_token from MY logged in session, then I DO see the post in the JSON so I'm very confused. if everyone in the world can see those posts on the wall without even authenticating, then I expect all of them to come back in the graph api as well. anyone have thoughts on this? I am aware of the "manage_page" permission... which I can use to get a list of accounts and special offline access tokens for those pages... and that's something I can explore... but it seems like alot of work when my post seemingly SHOULD be there in the graph

    Read the article

  • Scene Graph Traversing Techniques

    - by Bunkai.Satori
    Scene Graph seems to be the most effective way of representing the game world. The game world usually tends to be as large as the memory and device can handle. In contrast, the screen of the device captures only a fraction of the Game World/Scene Graph. Ideally, I wish to process(update and render) only the visible game objects/nodes on per-frame basis. My question therefore is, how to traverse the scene graph so, that I will focus only on the game notes that are in the camera frustum? How to organize data so that I can easily focus only on the scene graph nodes visible to me? What are techniques to minimize scenegraph traversal time? Is there such way as more effective traversal, or do I have to traverse whole scene graph on per-frame basis?

    Read the article

  • Facebook Graph Api doesn't redirect to my callback

    - by Pentium10
    I am following the steps to do the authorization as described here, but I am not redirected to my callback url. I get the following five steps after calling the first one: https://graph.facebook.com/oauth/authorize?display=touch&client_id=...&redirect_uri=... https://www.facebook.com/connect/uiserver.php?display=touch&client_id=...&redirect_uri=...&next=https://graph.facebook.com/oauth/authorize_success?display=touch&client_id=...&redirect_uri=...&type=web_server&cancel_url=https://graph.facebook.com/oauth/authorize_cancel?display=touch&client_id=...&redirect_uri=...&method=permissions.request&return_session=1 http://www.facebook.com/ http://touch.facebook.com/?w2m http://touch.facebook.com/login.php?next=http://touch.facebook.com/?w2m&cancel=http://touch.facebook.com/?w2m&fbconnect=0&r39c26cf0&refid=108 As you see the 5th steps just displays the login screen. If I log in, or I am already logged in I am presented with the home page. I use my application key, and the connect url of the app I've setup in FB Developers page. What I am doing wrong, why I am not redirected to my url?

    Read the article

  • Graph theory in python

    - by Dan
    I was wondering how people deal with graph theory in python? How is a graph stored? Are there libraries for this? For example how would I input a graph and then find its Chromatic polynomial? Or its girth? Or the number of unique spanning trees? How about problems that involve edge weight like salesman problems? I don't need all of these answered, I'm just looking for a method or tool set that will be able to help me approach solve problems like this. Thanks, Dan

    Read the article

  • shortest directed odd cycle

    - by gleb-pendler
    6.1.4 Describe an algorithm based on breadth-first search for finding a shortest odd cycle in a graph. 6.3.5 Describe an algorithm based on directed breadth-first search for finding a shortest directed odd cycle in a digraph. what is most importent is that it must be a directed graph not necessary bfs but must be the shortest directed odd cycle!!! Question was taken from "Graph Theory" by J.A. Bondy and U.S.R. Murty thanks in advance!!!

    Read the article

  • isometric drawing order with larger than single tile images - drawing order algorithm?

    - by Roger Smith
    I have an isometric map over which I place various images. Most images will fit over a single tile, but some images are slightly larger. For example, I have a bed of size 2x3 tiles. This creates a problem when drawing my objects to the screen as I get some tiles erroneously overlapping other tiles. The two solutions that I know of are either splitting the image into 1x1 tile segments or implementing my own draw order algorithm, for example by assigning each image a number. The image with number 1 is drawn first, then 2, 3 etc. Does anyone have advice on what I should do? It seems to me like splitting an isometric image is very non obvious. How do you decide which parts of the image are 'in' a particular tile? I can't afford to split up all of my images manually either. The draw order algorithm seems like a nicer choice but I am not sure if it's going to be easy to implement. I can't solve, in my head, how to deal with situations whereby you change the index of one image, which causes a knock on effect to many other images. If anyone has an resources/tutorials on this I would be most grateful.

    Read the article

  • Graph Generation in flex

    - by Roshan
    I need to generate a graph using the following XML in FLEX. [Bindable] public var stockDataAC:ArrayCollection = new ArrayCollection( [ {date: "2010, 4, 27", close: 41.71}, {date: "2010, 4, 28", close: 42.21}, {date: "2010, 5, 2", close: 42.71}, {date: "2010, 5, 3", close: 42.99}, {date: "2010, 5, 4", close: 44} ]); .............. < mx:horizontalAxis < mx:DateTimeAxis dataUnits="days" displayLocalTime="true" parseFunction="myParseFunction" / < /mx:horizontalAxis But this displays the graph from 2010/4/27 till 2010/5/4 including 2010/4/29, 2010/4/30 and 2010/5/1. I require the graph to display only the points in XML and exclude remaining thought it lies in between since it contains no data. How this can be done?

    Read the article

  • construct graph from python set type.

    - by Vincent
    The sort question, is the an off the self function to make a graph from a set of python sets? The longer: I have several python set types. They each overlap or some are sub sets of others. I would like to make a graph (as in nodes and edges) with the edges weighted by common intersection of the sets. There are several graphing packages for python. (NetworkX, igraph,...) I am not familiar with the use of any of them. Will any of them make a graph directly from a list of sets ie, MakeGraphfromSets(alistofsets) If not do you know of an example of how to take the list of sets to define the edges. It actually looks like it might be straight forward but an example is always good to have.

    Read the article

  • Optimizing Dijkstra for dense graph?

    - by Jason
    Is there another way to calculate the shortest path for a near complete graph other than Dijkstra? I have about 8,000 nodes and about 18 million edges. I've gone through the thread "a to b on map" and decided to use Dijkstra. I wrote my script in Perl using the Boost::Graph library. But the result isn't what I expected. It took about 10+ minutes to calculate one shortest path using the call $graph-dijkstra_shortest_path($start_node,$end_node); I understand there are a lot of edges and it may be the reason behind the slow running time. Am I dead in the water? Is there any other way to speed this up?

    Read the article

  • Optimally reducing maximum flow

    - by ArIck
    Given a parameter k, I'm trying to delete k edges from a directed graph such that the maximum flow is reduced by as much as possible. The graph has a source s and a sink t, and the capacity of each edge is one. The graph may or may not contain cycles. My proposed solution would be to first perform a topological sorting on the graph, using an algorithm that "forgives" cycles -- perhaps by ignoring edges that lead us back to the source. Then (assuming k = 1): i = 0 for each vertex u order by topological(u) for each edge (u, v) order by topological(v) descending if topological(v) > topological(u) then delete (u, v) if ++i = k then return else // edge doesn't contribute to max flow, ignore Would this work, or am I totally off-track here?

    Read the article

  • Which C++ graph library should I use?

    - by mspoerr
    Hello, I found the following graph libraries, but I am not sure which one I should use. Maybe there are some more... Graphviz (http://www.graphviz.org/) Boost Graph Library (http://www.boost.org/doc/libs/1_42_0/libs/graph/doc/index.html) Lemon (http://lemon.cs.elte.hu/trac/lemon) igraph (http://igraph.sourceforge.net/introduction.html) What it should do: draw a undirected network map come as header only or static lib for Windows the output format should be user editable Graphviz is the only one I tried so far, but I found no static lib for it, I failed to build it by my own and the documentation could be better. Therefore I looked around and found these other three libs. I would be glad to get some recommendations which lib to choose. Thanks, /mspoerr

    Read the article

  • How to serialize a graph ?

    - by Michael
    This is an interview question: How to serialize a graph ? I saw this answer but I am not sure if this is enough. It looks like a very confusing "open question" and the candidates are probably expected to ask more questions about the requirements: what the nodes and edges are, how they are serialized themselves, is this graph weighted, directed, etc., how many nodes/edges are in the graph.What about the infrastructure ? Is it a plain file system or we should/can use a database ? So, how would you answer this question ?

    Read the article

  • Plotting a cumulative graph of python datetimes

    - by ventolin
    Say I have a list of datetimes, and we know each datetime to be the recorded time of an event happening. Is it possible in matplotlib to graph the frequency of this event occuring over time, showing this data in a cumulative graph (so that each point is greater or equal to all of the points that went before it), without preprocessing this list? (e.g. passing datetime objects directly to some wonderful matplotlib function) Or do I need to turn this list of datetimes into a list of dictionary items, such as: {"year": 1998, "month": 12, "date": 15, "events": 92} and then generate a graph from this list? Sorry if this seems like a silly question - I'm not all too familiar with matplotlib, and would like to save myself the effort of doing this the latter way if matplotlib can already deal with datetime objects itself.

    Read the article

  • Storing parameters from a graph and applying to other graphs

    - by Braden
    I would like to store the xmin and xmax parameters from one geom_histogram and apply them to a second geom_histogram. I am putting both graphs on the same page using grid.arrange and would like them to have the same x range, while allowing the first graph to establish the range based on its data. The second graph is produced from a subset of the first graphs data, so it will not have data that falls outside of the x-range established by the first. But I don't want the range to shrink to fit the second graph.

    Read the article

  • Longest Path in Boost Graph

    - by TheTSPSolver
    Hi, Sorry if this is a very basic questions for some of you but I'm new to C++ (let alone Boost Graph Library) and couldn't figure out this problem. So far I've been able to formulate/gather code to create a graph using the code below. Now I'm trying to figure out the code to find the longest path in this graph. Can someone please help with what would the code be? I was having trouble trying to figure out if/how to traverse through each node and/or edge when trying to find the path? I have to try to return all the nodes and edges in the longest path. Any help will be greatly appreciated. P.S. does anyone know if C++ has organized documentation like Javadoc?? #include <boost/graph/dag_shortest_paths.hpp> #include <boost/graph/adjacency_list.hpp> #include <windows.h> #include <iostream> int main() { using namespace boost; typedef adjacency_list<vecS, vecS, directedS, property<vertex_distance_t, double>, property<edge_weight_t, double> > graph_t; graph_t g(6); enum verts { stationA, stationB, stationC, stationD, stationE, stationF }; char name[] = "rstuvx"; add_edge(stationA, stationB, 5000.23, g); add_edge(stationA, stationC, 3001, g); add_edge(stationA, stationD, 2098.67, g); add_edge(stationA, stationE, 3298.84, g); add_edge(stationB, stationF, 2145, g); add_edge(stationC, stationF, 4290, g); add_edge(stationD, stationF, 2672.78, g); add_edge(stationE, stationF, 11143.876, g); add_edge(stationA, stationF, 1, g); //Display all the vertices typedef property_map<graph_t, vertex_index_t>::type IndexMap; IndexMap index = get(vertex_index, g); std::cout << "vertices(g) = "; typedef graph_traits<graph_t>::vertex_iterator vertex_iter; std::pair<vertex_iter, vertex_iter> vp; for (vp = vertices(g); vp.first != vp.second; ++vp.first) std::cout << index[*vp.first] << " "; std::cout << std::endl; // ... // Display all the edges // ... std::cout << "edges(g) = " << std::endl; graph_traits<graph_t>::edge_iterator ei, ei_end; for (tie(ei, ei_end) = edges(g); ei != ei_end; ++ei) std::cout << "(" << index[source(*ei, g)] << "," << index[target(*ei, g)] << ") \n"; std::cout << std::endl; // ...

    Read the article

  • PHP mtChart (new pChart): how do i control the angle of x-axis labels?

    - by gsquare567
    i am trying to graph the results of a survey, where the question is multiple choice. eg. How would you describe this website? format: option | number of times selected | percentage of users who selected that option Informative 1 50% All of the above 1 50% Interesting 0 0% Intelligent 0 0% Cool 0 0% Incredible 0 0% Sleek 0 0% Amazing the graph is a bar graph, where each bar represents one of those options, and the height of the bar depends on the number of times selected. however, the labels are slanted at a 45 degree angle and are barely readable! here is my code: <?php require_once ("includes/common.php"); require_once ("graph/mtChart.min.php"); // type must be specified $type = $_GET['type']; if($type == "surveys_report_MC_or_CB") { // PARAMS $surveyID = $_GET['surveyID']; $questionID = $_GET['questionID']; // END PARAMS $question = SurveyQuestions::getSingle($questionID); $answers = SurveyAnswers::getAll($questionID); $options = SurveyQuestionOptions::getAll($question[SurveyQuestions::surveyQuestionID]); $others = SurveyAnswers::setOptionCounts($options, $answers); $printedOthers = false; // set graph $values = array(); $axisLabels = array(); foreach($options as $option) { $values[$option[SurveyQuestionOptions::optionText]] = $option['count']; $axisLabels[] = $option[SurveyQuestionOptions::optionText]; } $graphs = array(); $graphs[0] = $values; $xName = "Option"; $yName = "Number of Times Selected"; $graphTitle = $question[SurveyQuestions::question]; $series = array("Total"); $showLegend = false; $tall = false; } drawGraph($graphs, $axisLabels, $xName, $yName, $graphTitle, $series, $showLegend, $tall); function drawGraph($graphs, $axisLabels, $xName, $yName, $graphTitle, $series, $showLegend, $tall) { $Graph = ($tall) ? new mtChart(575,375) : new mtChart(575,275); // Dataset definition $avg = 0; $i = 0; foreach ($graphs as $key => $value) { $Graph->AddPoint($value,"series" . $key); $Graph->SetSerieName($series[$key],"series" . $key); // Get average $avg += array_sum($value); $size = sizeof($value); $i += $size; // Calculate x-axis tick interval $step = ceil($size / 25); } $Graph->AddPoint($axisLabels,"XLabel"); $Graph->AddAllSeries(); $Graph->RemoveSerie("XLabel"); $Graph->SetAbsciseLabelSerie("XLabel"); $Graph->SetXAxisName($xName); $Graph->SetYAxisName($yName); // Get from cache if it exists $Graph->enableCaching(NULL, 'graph/cache/'); $Graph->GetFromCache(); // Initialize the graph $Graph->setInterval($step); $Graph->setFontProperties("graph/tahoma.ttf",8); ($showLegend) ? $Graph->setGraphArea(45,30,475,200) : $Graph->setGraphArea(75,30,505,200); $Graph->drawGraphArea(255,255,255,TRUE); $Graph->drawScale(SCALE_START0,100,100,100,TRUE,55,1,TRUE); $Graph->drawGrid(4,TRUE,230,230,230,50); // Draw the 0 line $Graph->setFontProperties("graph/tahoma.ttf",6); $Graph->drawTreshold(0,143,55,72,TRUE,TRUE); // Draw the bar graph $Graph->drawBarGraph(); // Draw average line $Graph->drawTreshold($avg/$i, 0, 0, 0, FALSE, FALSE, 5); // Finish the graph $Graph->setFontProperties("graph/tahoma.ttf",8); if ($showLegend) { $Graph->drawLegend(482,30,255,255,255,255,255,255,100,100,100); } $Graph->setFontProperties("graph/tahoma.ttf",10); $Graph->drawTitle(0,22,$graphTitle,100,100,100,555); // Draw Graph $Graph->Stroke(); } and here is where i use it on the page: <div class="graph_container"> <img src="drawGraph.php?type=surveys_report_MC_or_CB&surveyID=<?php echo $survey[Surveys::surveyID] ?>&questionID=<?php echo $question[SurveyQuestions::surveyQuestionID] ?>" /> is there a setting i can apply to the graph which will make the text look nicer, or at least let me set the angle to 90 degrees so people can read it if they cock their head to the left? thanks! btw, mtchart is located here: http://code.google.com/p/mtchart/ and pchart (the original, which has mainly the same code) is here: http://pchart.sourceforge.net/documentation.php

    Read the article

  • algorithms undirected graph twodegree[]

    - by notamathwiz
    For each node u in an undirected graph, let twodegree[u] be the sum of the degrees of u's neighbors. Show how to compute the entire array of twodegree[.] values in linear time, given a graph in adjacency list format. This is the solution for all u ? V : degree[u] = 0 for all (u; w) ? E: degree[u] = degree[u] + 1 for all u ? V : twodegree[u] = 0 for all (u; w) ? E: twodegree[u] = twodegree[u] + degree[w] can someone explain what degree[u] does in this case and how twodegree[u] = twodegree[u] + degree[w] is supposed to be the sum of the degrees of u's neighbors?

    Read the article

  • What algorithm to use to fill a KenKen square board with cages?

    - by JimmyBoh
    I am working on recreating KenKen, a popular math puzzle involving a blank grid that is divided into "cages". Each cage is just a collection of adjacent squares and has a clue which is generally a number and an operand, shown below: What type of algorithm would be best to fill the square with cages? Assume the maximum number of cells per cage would be 3 and the board is 4x4 in size, like in the example above.

    Read the article

  • Facebook Graph API: user gender

    - by Mark
    The old Facebook API provided the user sex/gender as part of the default user data. Apparently the new Graph API does not provide that information, even though the documentation says that it does. I've heard people say that you need to request special permissions to get it and other pieces of data, but I have not been successful in getting it to work. Does anyone have an example, using the Facebook Graph API, of how to get the user's gender and/or location (city/state/country/whatever)?

    Read the article

  • Lawler's Algorithm Implementation Assistance

    - by Richard Knop
    Here is my implemenation of Lawler's algorithm in PHP (I know... but I'm used to it): <?php $jobs = array(1, 2, 3, 4, 5, 6); $jobsSubset = array(2, 5, 6); $n = count($jobs); $processingTimes = array(2, 3, 4, 3, 2, 1); $dueDates = array(3, 15, 9, 7, 11, 20); $optimalSchedule = array(); foreach ($jobs as $j) { $optimalSchedule[] = 0; } $dicreasedCardinality = array(); for ($i = $n; $i >= 1; $i--) { $x = 0; $max = 0; // loop through all jobs for ($j = 0; $j < $i; $j++) { // ignore if $j already is in the $dicreasedCardinality array if (false === in_array($j, $dicreasedCardinality)) { // if the job has no succesor in $jobsSubset if (false === isset($jobs[$j+1]) || false === in_array($jobs[$j+1], $jobsSubset)) { // here I find an array index of a job with the maximum due date // amongst jobs with no sucessor in $jobsSubset if ($x < $dueDates[$j]) { $x = $dueDates[$j]; $max = $j; } } } } // move the job at the end of $optimalSchedule $optimalSchedule[$i-1] = $jobs[$max]; // decrease the cardinality of $jobs $dicreasedCardinality[] = $max; } print_r($optimalSchedule); Now the above returns an optimal schedule like this: Array ( [0] => 1 [1] => 1 [2] => 1 [3] => 3 [4] => 2 [5] => 6 ) Which doesn't seem right to me. The problem might be with my implementation of the algorithm because I am not sure I understand it correctly. I used this source to implement it: http://www.google.com/books?id=aSiBs6PDm9AC&pg=PA166&dq=lawler%27s+algorithm+code&lr=&hl=sk&cd=4#v=onepage&q=&f=false The description there is a little confusing. For example, I didn't quite get how is the subset D defined (I guess it is arbitrary). Could anyone help me out with this? I have been trying to find some sources with simpler explanation of the algorithm but all sources I found were even more complicated (with math proofs and such) so I am stuck with the link above. Yes, this is a homework, if it wasn't obvious. I still have few weeks to crack this but I have spent few days already trying to get how exactly this algorithm works with no success so I don't think I will get any brighter during that time.

    Read the article

  • How to draw a graph in LaTeX?

    - by Amir Rachum
    First of all, let me say I'm using LyX, though I have no problem using ERT. Secondly, what is the most simplest way to draw a simple graph like this in Latex? I've seen some documents with graphs and I've seen some examples, but I couldn't figure out how to just draw a simple graph - what packages do I need, etc?

    Read the article

  • jQuery Graph from a PHP page

    - by Francesc
    Hi. I'm looking for a jQuery Plugin to create a graph like that http://www.panic.com/blog/2010/03/the-panic-status-board/. To update the graph every x miliseconds from a PHP page and the numbers that are on the top. Is it possible? Do you know any plugin that does that? Thanks!

    Read the article

  • Drawing a Web Graph

    - by Kenn
    I'm trying to draw a graph on an ASP webpage. I'm hoping an API can be helpful, but so far I have not been able to find one. The graph contains labeled nodes and unlabeled directional edges. The ideal output would be something like this. Anybody know of anything pre-built than can help?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >