Click here to Skip to main content
15,849,487 members
Home / Discussions / C#
   

C#

 
Questionlimiting recursion as two interdependent values change c# Pin
BillWoodruff27-Aug-23 2:15
professionalBillWoodruff27-Aug-23 2:15 
GeneralRe: limiting recursion as two interdependent values change c# Pin
harold aptroot27-Aug-23 14:14
harold aptroot27-Aug-23 14:14 
GeneralRe: limiting recursion as two interdependent values change c# Pin
BillWoodruff28-Aug-23 4:41
professionalBillWoodruff28-Aug-23 4:41 
GeneralRe: limiting recursion as two interdependent values change c# Pin
harold aptroot28-Aug-23 5:55
harold aptroot28-Aug-23 5:55 
GeneralRe: limiting recursion as two interdependent values change c# Pin
Gerry Schmitz28-Aug-23 7:50
mveGerry Schmitz28-Aug-23 7:50 
GeneralRe: limiting recursion as two interdependent values change c# Pin
BillWoodruff28-Aug-23 12:08
professionalBillWoodruff28-Aug-23 12:08 
GeneralRe: limiting recursion as two interdependent values change c# Pin
BillWoodruff28-Aug-23 12:13
professionalBillWoodruff28-Aug-23 12:13 
GeneralRe: limiting recursion as two interdependent values change c# Pin
harold aptroot28-Aug-23 13:36
harold aptroot28-Aug-23 13:36 
Your data structure is really a sparse matrix, right? It's a bit hidden behind the domain-specific terminology, but in the end it's a weighted graph represented as a sparse matrix. There's nothing wrong with that, it's a standard way to manipulate weighted (and even unweighted) graphs in both programming and mathematics.
BillWoodruff wrote:
How can you have "reciprocity" and "invariant."
Well I mean, there is some invariant on this matrix that you are maintaining, right? And it has something to do with the reciprocal edge (you called it that, I'm just going with it). If a weight somewhere is changed, then its "mirror image" (the reverse edge) needs to change in some way to restore that invariant. I didn't really get how it needs to be changed specifically (or what the invariant is that is being maintained by that change), but I suppose that's largely an implementation detail that doesn't need to affect the overall architecture.

So essentially my suggestion is: make the overall matrix responsible for maintaining that invariant, not the edges. And so, the edges would not try to "fix themselves" in response to an event, you would tell the matrix to change an edge weight and it would directly do so in a way that maintains the invariant (by changing the weight of an edge and the corresponding reverse edge), with no events involved (of course you can still raise them, but that wouldn't be the mechanism for maintaining the invariant).
GeneralRe: limiting recursion as two interdependent values change c# Pin
BillWoodruff28-Aug-23 23:48
professionalBillWoodruff28-Aug-23 23:48 
QuestionC# error when I try to run Pin
Member 1607362720-Aug-23 19:22
Member 1607362720-Aug-23 19:22 
AnswerRe: C# error when I try to run Pin
OriginalGriff20-Aug-23 19:27
mveOriginalGriff20-Aug-23 19:27 
AnswerRe: C# error when I try to run Pin
Richard Deeming20-Aug-23 22:01
mveRichard Deeming20-Aug-23 22:01 
QuestionHikVision Biometrics Pin
Icanus Tuiloma20-Aug-23 15:48
Icanus Tuiloma20-Aug-23 15:48 
AnswerRe: HikVision Biometrics Pin
Dave Kreskowiak20-Aug-23 18:16
mveDave Kreskowiak20-Aug-23 18:16 
GeneralRe: HikVision Biometrics Pin
Icanus Tuiloma20-Aug-23 19:11
Icanus Tuiloma20-Aug-23 19:11 
QuestionFormat integer with ToString("D2") in SqLite Pin
Edilson Lemos 202118-Aug-23 17:21
Edilson Lemos 202118-Aug-23 17:21 
AnswerRe: Format integer with ToString("D2") in SqLite Pin
Dave Kreskowiak18-Aug-23 17:52
mveDave Kreskowiak18-Aug-23 17:52 
GeneralRe: Format integer with ToString("D2") in SqLite Pin
Edilson Lemos 202118-Aug-23 18:36
Edilson Lemos 202118-Aug-23 18:36 
AnswerRe: Format integer with ToString("D2") in SqLite Pin
OriginalGriff18-Aug-23 19:31
mveOriginalGriff18-Aug-23 19:31 
QuestionFile csproj : how to create a nuget package with msbuild and with package dependencies ? Pin
chris_brabant16-Aug-23 2:42
chris_brabant16-Aug-23 2:42 
AnswerRe: File csproj : how to create a nuget package with msbuild and with package dependencies ? Pin
Richard Deeming16-Aug-23 4:11
mveRichard Deeming16-Aug-23 4:11 
GeneralRe: File csproj : how to create a nuget package with msbuild and with package dependencies ? Pin
chris_brabant16-Aug-23 5:00
chris_brabant16-Aug-23 5:00 
GeneralRe: File csproj : how to create a nuget package with msbuild and with package dependencies ? Pin
Richard Deeming16-Aug-23 5:14
mveRichard Deeming16-Aug-23 5:14 
GeneralRe: File csproj : how to create a nuget package with msbuild and with package dependencies ? Pin
chris_brabant16-Aug-23 5:48
chris_brabant16-Aug-23 5:48 
GeneralRe: File csproj : how to create a nuget package with msbuild and with package dependencies ? Pin
Richard Deeming16-Aug-23 22:14
mveRichard Deeming16-Aug-23 22:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.