Search Results for

    Show / Hide Table of Contents

    Struct Neighbor<T>

    A simple container for neighbor search results.

    Contains a reference to a neighbor particle, the local direction in which it was found, and a flag indicating whether the direction is relative to the querying particle's head or tail.

    Namespace: AS2.Sim
    Assembly: .dll
    Syntax
    public struct Neighbor<T> where T : class
    Type Parameters
    Name Description
    T

    The type of the neighbor particle.

    Constructors

    | Edit this page View Source

    Neighbor(T, Direction, bool)

    Declaration
    public Neighbor(T neighbor, Direction localDir, bool atHead)
    Parameters
    Type Name Description
    T neighbor
    Direction localDir
    bool atHead

    Fields

    | Edit this page View Source

    Null

    Declaration
    public static Neighbor<T> Null
    Field Value
    Type Description
    Neighbor<T>
    | Edit this page View Source

    atHead

    Declaration
    public bool atHead
    Field Value
    Type Description
    bool
    | Edit this page View Source

    localDir

    Declaration
    public Direction localDir
    Field Value
    Type Description
    Direction
    | Edit this page View Source

    neighbor

    Declaration
    public T neighbor
    Field Value
    Type Description
    T

    Methods

    | Edit this page View Source

    Equals(object)

    Indicates whether this instance and a specified object are equal.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current instance.

    Returns
    Type Description
    bool

    true if obj and this instance are the same type and represent the same value; otherwise, false.

    Overrides
    System.ValueType.Equals(object)
    | Edit this page View Source

    GetHashCode()

    Returns the hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A 32-bit signed integer that is the hash code for this instance.

    Overrides
    System.ValueType.GetHashCode()

    Operators

    | Edit this page View Source

    operator ==(Neighbor<T>, Neighbor<T>)

    Declaration
    public static bool operator ==(Neighbor<T> nbr1, Neighbor<T> nbr2)
    Parameters
    Type Name Description
    Neighbor<T> nbr1
    Neighbor<T> nbr2
    Returns
    Type Description
    bool
    | Edit this page View Source

    operator !=(Neighbor<T>, Neighbor<T>)

    Declaration
    public static bool operator !=(Neighbor<T> nbr1, Neighbor<T> nbr2)
    Parameters
    Type Name Description
    Neighbor<T> nbr1
    Neighbor<T> nbr2
    Returns
    Type Description
    bool
    • Edit this page
    • View Source
    In this article
    Back to top AmoebotSim 2.0 Documentation v1.11
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX