Posts

Showing posts from June, 2017

Dense - Seidel And Laplacian Adjacency Matrix

Given Mendz.Graphs..Dense.AdjacencyMatrixBase , it's not that difficult to create other types of adjacency matrices. Let's look at two of them: the Seidel adjacency matrix and Laplacian matrix.

Dense - Using Mendz.Graphs..AdjacencyMatrix

Mendz.Graph.AdjacencyMatrix implements an adjacency matrix. So, how do you use it?

Dense - Adjacency Matrix

In graph theory, the adjacency matrix is defined as a square matrix used to represent a finite graph, where the elements of the matrix indicate whether pairs of vertices are adjacent or not in the graph ( Wikipedia ).

Mendz.Library Matrix and SquareMatrix

Image
This article kicks-off the dense matrix series. Before we dive in to the nitty-gritty, let's have a quick discussion about Mendz.Graphs' dense matrix.

The Matrix

Image
What is the matrix? No, this article is not about the movie . This article actually kicks off a new series on graph theory, graphs and their representations. So far, I've covered representing graphs as an adjacency list . Now, it's time to represent graphs as matrices.

Project Mendz.Graphs So Far...

Image
Let's stop for a moment and celebrate our progress with Mendz.Graphs.

Where Is The Incidence List?

Honestly, I actually created an "incidence list" class. Then I deleted it. And, no, it was not an accident.

Using Mendz.Graphs..AdjacencyList

Image
Mendz.Graphs.Representations.Lists.AdjacencyList implements an adjacency list. So, how do you use it?

Adjacency List

In graph theory, the adjacency list is defined as a collection of unordered lists used to represent a finite graph, where each list describes the set of neighbors of a vertex in the graph ( Wikipedia ). Mendz.Graphs.AdjacencyList implements an enhanced adjacency list that can also be used to retrieve the incidence.

Representing Graphs

Mendz.Graphs implements the graph theory's definition of the graph. The Graph class provides features to maintain the Vertices, Edges and their respective indexes. It can also be used to generate the graph's DOT notation. So does the Graph class represent a graph? Well, yes and... not exactly.

Reviewing Mendz.Library.ResultInfo

In Working with Dapper (Part 2) , I showed Mendz.Library.ResultInfo, a class which allows procedures to return a structured message that is rich with data and information. While testing scenarios with using ResultInfo, I found a flaw that needs to be fixed.

Using Mendz.Graphs

Image
A good thing that came out of writing about my own work, it gave me a chance to rediscover and review what I did. When I first wrote Mendz.Graphs around a year ago or so, I was using .Net Framework 4.x. As of this week, after posting about the Graph yesterday, Mendz.Graphs is officially a .Net Core class library project.

Reviewing Mendz.Graphs.Graph

The Graph Theory in C# presented the Graph, Vertex and Edge classes to implement the graph theory's definition of a graph: G = (V, E). While reviewing Mendz.Graphs for memory and performance optimization, it went through dramatic changes and enhancements. Previously, I reviewed the Vertex and Edge . This article focuses on the Graph.

Reviewing Mendz.Graphs.Edge

The Graph Theory in C# presented the Graph, Vertex and Edge classes to implement the graph theory's definition of a graph: G = (V, E). While reviewing Mendz.Graphs for memory and performance optimization, it went through dramatic changes and enhancements. Previously, I reviewed the Vertex . This article focuses on the Edge.

Reviewing Mendz.Graphs.Vertex

The Graph Theory in C# presented the Graph, Vertex and Edge classes to implement the graph theory's definition of a graph: G = (V, E). While reviewing Mendz.Graphs for memory and performance optimization, it went through dramatic changes and enhancements. This article focuses on the Vertex.

Learn To Code With Loops

Eat. Sleep. Code. Repeat. This whatchamacallit can make a developer smile or smirk. For those who experienced it once or so in their career, it can both be both funny and, well, not so funny at all. Whatever it means to you, just know instead that developers live, love and laugh just like everyone else. But I digress. The point at hand really is understanding what it means to "repeat".

Learn To Code With Variables

If you could give each of your memories a name, it would make each of them more memorable. Giving a name to everything is human nature. It is how we acknowledge and recognize the presence of something or someone. It is how we remember. It is how we communicate. It is how we share.

Learn To Code With Logic

Logic formulation is fundamental to learning how to code. Although you can learn to code from examples, the ability to solve real world problems can boil down to your ability to apply, build and express logic.

ASP.Net Core 2 Razor Pages

Once in a while, you just want a web page. In ASP.Net's MVC world, that means all the scaffolding and coding for Model, View and Controller. ASP.Net Core 2's Razor Pages simplifies all the plumbing to just getting the page done with the knowledge that it's all MVC underneath.

Dependency Injection To The Core!

There's a new product in town that embraced dependency injection to the core: .Net Core (and, therefore, ASP.Net Core ). If you like dependency injection (DI), .Net Core gives you DI overload, like sugar sprinkled on honey with a cherry on top!

Mendz.Data And Transactions

Mendz.Data represents the team's "core architecture" for creating applications with a database backend. Mendz.Data (and Mendz.Library) is discussed in the Preparing for Dapper and Working with Dapper series. This article is in response to an inquiry about transactions with repositories based on Mendz.Data.

Working with Dapper (Summary)

Dapper inspired me to develop a new "core architecture" for creating database contexts, "repositories" and using them in applications. In my design, the applications are data source agnostic, shielded by the repositories from the intricacies of the data layer. In practice, Dapper is used exclusively in the repository's CRUDS implementations.

Working with Dapper (Part 4)

In order to guide developers on how to define repositories, I created CRUDS interfaces with expandable signatures and support for structured return values. This article describes how to use the Mendz.Data classes to create a database context, a POCO, a repository and, finally, to use them in an application.