algorithm,graph,dijkstra,vertices

If by "distance" you mean "shortest distance", then the answer is "Yes". A very popular algorithm for all-pairs shortest paths is Floyd Warshall Algorithm. It is remarkably easy to implement: for k = 0 ; k != N ; k++ for i = 0 ; i != N ; i++...

python,list,indexing,maya,vertices

Wouldn't it be awesome if it were easy to get the object from Maya? From experience, I know it can be frustrating since MEL/maya.cmds doesn't use an object-oriented approach. Anyhow, you should refer to the documentation often for more info on the variety of string methods you can use. Really...

c++,directx,vertex-buffer,vertices

This is because each vertex can only have a single position and a single vertex normal. The model is specified as having face normals (i.e. each face has a unique normal) which requires vertex duplication to be specified as per-vertex normals. The first face is 4,3,2 for position but 0,0,0...

javascript,three.js,geometry,mesh,vertices

You can find the geometry in the hierarchy by doing this: object.traverse( function ( child ) { if ( child.geometry !== undefined ) { console.log( child.geometry.vertices ); } } ); ...

You want to insert the edge so the number of vertices gets automatically adjusted to accommodate the source and target for the edge. Then, just copy the vertex properties by their bundles, no need to meddle with the member-specific maps (these are useful when you want to pass specific properties...

c++,opengl,projection,vertices,glu

Part of my problem here was poorly describing it. I accidentally left residual code from frantically testing, resulting in bits of "read Pixel" functions and related nonsense which wasn't useful for solving the problem. The rest of my problem was due to inconsistent data types for the matrices, and trying...

Maybe you want something like this: library(igraph) library(Matrix) download.file("https://www.dropbox.com/s/q7sxfwjec97qzcy/people.csv?dl=1", tf <- tempfile(fileext = ".csv"), mode = "wb") people <- read.csv(tf) A <- spMatrix(nrow = length(unique(people$people)), ncol = length(unique(people$repository_id)), i = as.numeric(factor(people$people)), j = as.numeric(factor(people$repository_id)), x = rep(1, length(as.numeric(people$people))) ) row.names(A) <- levels(factor(people$people)) colnames(A) <-...

matlab,function,variables,random,vertices

Do not do this. If you find yourself having lots of variables x1, x2, x3 etc, in MATLAB, you have made a wrong turn. Even more so if you have to try and create them automatically. You will only make your life more difficult when you attempt to do anything...

opengl,opengl-es,textures,vertices

It totally depends on the resolution. In fact, you're right that you'd limit the vertices amount, but you have to understand the Graphics Pipeline. Even tough the texture is only black and white, OpenGL has to work with each Texel of the texture, getting even more expensive if you don't...

python,list,graph,vertices,edges

You can zip your two lists, then use itertools.product to create each of your combinations. You can use itertools.chain.from_iterable to flatten the resulting list. >>> import itertools >>> List1 = [ ['a','b'], ['c','d','e'], ['f'] ] >>> List2 = [ ['g','h','i'], ['j'], ['k','l'] ] >>> list(itertools.chain.from_iterable(itertools.product(a,b) for a,b in zip(List1, List2)))...

opengl,haskell,shader,vertices

Got it working! Main reason it wasn't working is because I wasn't using the projection matrix as well. Please don't beat me with sticks for my bad/confusing variable names. mvMatrix <- get ((matrix $ Just $ Modelview 0)::StateVar(GLmatrix GLfloat)) pMatrix <- get ((matrix $ Just Projection)::StateVar(GLmatrix GLfloat)) mv <- getMatrixComponents...

graph,apache-spark,vertices,edges,spark-graphx

Try: edges.intersection(edges.map(e => Edge(e.dstId, e.srcId)) Note that this compares the Edge.attr values as well. If you want to ignore attr values, then do this: edges.map(e=> (e.srcId,e.dstId)).intersection(edges.map(e => (e.dstId, e.srcId))) ...

opengl,buffer,vbo,vertices,vao

Fundamentally, you need to understand two things: Vertex Array Objects (VAOs) are conceptually nothing but thin state wrappers. Vertex Buffer Objects (VBOs) store actual data. Another way of thinking about this is that VAOs can be used to describe/interpret the data stored in one or more VBOs. Think of VBOs...

3d,volume,voronoi,vertices,point-in-polygon

When you have input points, the simplest way is to iterate over them and check which one is closest to your new point. The closest of your input points will represent the region that contains your new point....